• Resolved zilla4

    (@zilla4)


    Hi,
    I’ve figured out how to add a line divider between each link in my bookmarks.

    My problem is the formatting of the <li> and <ul> is causing an extra line at the bottom of the list.

    this is my site: https://www.brookeluder.com/

    This is the code I’m using:
    <?php wp_list_bookmarks('title_li='.'&title_before='.'<li class="sidebar-title-divider">&title_after=</li>'.'<li class="sidebar-divider">&before=</li>'.'<li class="sidebar-divider">&after=</li>'); ?>

    My html lists (as shown below) work how do I formate my php to work the same way?

    <li class="divider"><span class="sidebar-title">OPTIMISED FOR:</span></li><ul>
    <li class="divider">Mozilla 3.06</li>
    <li class="divider">Internet Explorer 7.0</li>
     <li class="divider">All Others: Here Be Dragons</li>
    </ul>

    thanks for the help!!

Viewing 1 replies (of 1 total)
  • Thread Starter zilla4

    (@zilla4)

    Problem Solved…

    CSS

    #sidebar a, #sidebar a:visited {
    	text-decoration: none;
    	color: #797979;
    	}
    
    #sidebar a:hover {
    	text-decoration: none;
    	color: #cc9900;
    	}				
    
    /* this is the >> color and the (1) number color on categories*/
    #sidebar ul ul li {
    	color: #878787;
    	}	
    
    #sidebar ul {
    	list-style-type: none;
    	margin-top: 0px;
    	margin-bottom: 0px;
    	margin-left: 0px;
    	margin-right: 0px;
    	padding-bottom: 0px;
    	padding-left: 0px;
    	padding-right: 0px;
    	padding-top: 0px;
    	}
    
    .sidebar_alternate_title_li{
    	font-size: 1.4em;
    	font-weight: bold;
    	color: #9e9e9e;
    	list-style-type: none;
    	list-style-image: none;
    	margin-top: 20px;
    	margin-bottom: 3px;
    	padding-bottom: 1px;
    	border-bottom: 1px solid #5f5f5f;
    }
    
    .sidebar_alternate_content_li{
    	font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif;
    	color: #797979;
    	list-style-type: none;
    	list-style-image: none;
    	margin-top: 3px;
    	margin-bottom: 3px;
    	padding-bottom: 0px;
    	border-bottom: 1px solid #5f5f5f;
    }	
    
    #sidebar ul li ul li {
    	list-style-type: none;
    	list-style-image: none;
    	margin-bottom: 0px;
    	margin-top: 3px;
    	margin-bottom: 3px;
    	margin-left: 0px;
    	margin-right: 0px;
    	padding-bottom: 0px;
    	padding-left: 0px;
    	padding-right: 0px;
    	padding-top: 0px;
    	border-bottom: 1px solid #5f5f5f;
    	}	
    
    #sidebar ul ol {
    	list-style: none;
    	margin-bottom: 0px;
    	margin-top: 0px;
    	margin-bottom: 3px;
    	margin-left: 0px;
    	margin-right: 0px;
    	padding-bottom: 0px;
    	padding-left: 0px;
    	padding-right: 0px;
    	padding-top: 0px;
    }	
    
    #sidebar ul ol li {
    	color: #797979;
    	margin-bottom: 0px;
    	margin-top: 0px;
    	margin-bottom: 3px;
    	margin-left: 0px;
    	margin-right: 0px;
    	padding-bottom: 0px;
    	padding-left: 0px;
    	padding-right: 0px;
    	padding-top: 0px;
    	border-bottom: 1px solid #5f5f5f;
    }	
    
    #sidebar ul ul li {
    	margin-top: 3px;
    	margin-bottom: 0px;
    	margin-left: 0px;
    	margin-right: 0px;
    	padding-bottom: 0px;
    	padding-left: 0px;
    	padding-right: 0px;
    	padding-top: 0px;
    	}

    PHP

    <div id="sidebar">
    		<ul>
    			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    
    				<?php get_search_form(); ?>
    
    			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
    			<li><h2>Author</h2>
    			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
    			</li>
    			-->
    
    			<?php if ( is_404() || is_category() || is_day() || is_month() ||
    						is_year() || is_search() || is_paged() ) {
    			?> <li>
    
    			<?php /* If this is a 404 page */ if (is_404()) { ?>
    			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
    			<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
    
    			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
    			for the day <?php the_time('l, F jS, Y'); ?>.</p>
    
    			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
    			for <?php the_time('F, Y'); ?>.</p>
    
    			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
    			for the year <?php the_time('Y'); ?>.</p>
    
    			<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
    			<p>You have searched the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
    			for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
    
    			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    			<p>You are currently browsing the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives.</p>
    			<?php } ?>
    			</li> <?php }?>
    
    			<?php wp_list_pages('title_li=<li class="sidebar_alternate_title_li">PAGES</li><li>&before=&after=</li>'); ?>
    			<li class="sidebar_alternate_title_li">ARCHIVES</li>
    			<?php wp_get_archives('type=monthly'.'&before='.'<li class="sidebar_alternate_content_li">&after=</li>'); ?>
    			<?php if (function_exists('put_cat_icons')) put_cat_icons( wp_list_categories('show_count=1'.'&title_li='.'<li class="sidebar_alternate_title_li">POSTS</li><li>&after=</li>'.'&depth=-1'.'&echo=0'));
    			else wp_list_categories('show_count=1'.'&title_li=<span class="sidebar-title">POSTS</span><li>&after=</li>'); ?>
    			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    			<?php wp_list_bookmarks('title_li='.'&title_before='.'<li class="sidebar_alternate_title_li">&title_after=</li>&before=<li class="sidebar_alternate_content_li">&after=</li>'); ?>
    			<li class="sidebar_alternate_title_li">MEMBER LOGIN</li>
    				<ul>
    					<?php wp_register('<li class="sidebar_alternate_content_li">','</li>'); ?>
    				<li class="sidebar_alternate_content_li"><?php wp_loginout(); ?></li>
    					<?php wp_meta(); ?>
    				</ul>
    			<br /><br /><br />
                 <li class="sidebar_alternate_title_li">OPTIMISED FOR:</li>
                 <ol>
    					<li>Mozilla 3.06</li>
                        <li>Internet Explorer 7.0</li>
                        <li>All Others: Here Be Dragons</li>
    			</ol>
    			<?php } ?>
    
    			<?php endif; ?>
    		</ul>
    	</div>
Viewing 1 replies (of 1 total)
  • The topic ‘problem formating bookmarks with <li class>’ is closed to new replies.