wordpress css menu help

Discussion in 'CSS' started by Lpspider, Aug 5, 2008.

  1. #1
    I'm working on customizing the menu on a wordpress theme. I need css span to be applied inside the link. This works fine for normal links but for links from wp_list_pages it messes up the css.

    <li><?php wp_list_pages('title_li='); ?></li>
    <li><a href="#"><span>Title</span></a></li>
    </ul>

    The CSS shows up fine with the link "Title" but shows up incorrect for wp_list_pages.

    Is there any way around this? Can I somehow edit the html around wp_list_pages to include span?

    More info:

    I'm using this css:

    <style type="text/css">
    <!–
    #dolphincontainer{position:relative;height:56px;color:#E0E0E0;background:#143D55;width:100%;font-family:Helvetica,Arial,Verdana,sans-serif;}
    #dolphinnav{position:relative;height:33px;font-size:12px;text-transform:uppercase;font-weight:bold;background:#fff url(/code/dolphin/images/dolphin_bg.gif) repeat-x bottom left;padding:0 0 0 20px;}
    #dolphinnav ul{margin:0;padding:0;list-style-type:none;width:auto;float:left;}
    #dolphinnav ul li{display:block;float:left;margin:0 1px;}
    #dolphinnav ul li a{display:block;float:left;color:#EAF3F8;text-decoration:none;padding:0 0 0 20px;height:33px;}
    #dolphinnav ul li a span{padding:12px 20px 0 0;height:21px;float:left;}
    #dolphinnav ul li a:hover{color:#fff;background:transparent url(/code/dolphin/images/dolphin_bg-OVER.gif) repeat-x bottom left;}
    #dolphinnav ul li a:hover span{display:block;width:auto;cursor:pointer;}
    #dolphinnav ul li a.current,#dolphinnav ul li a.current:hover{color:#fff;background:#1D6893 url(/code/dolphin/images/dolphin_left-ON.gif) no-repeat top left;line-height:275%;}
    #dolphinnav ul li a.current span{display:block;padding:0 20px 0 0;width:auto;background:#1D6893 url(/code/dolphin/images/dolphin_right-ON.gif) no-repeat top right;height:33px;}
    –>
    </style>
    Code (markup):
    and this is the navbar file:

    <?php global $op_search; ?>
    
    <div id="dolphincontainer">
    <div id="dolphinnav">
    
    	<ul id="nav" <?php if($op_search == __('True','options')) echo 'class="nav-search"'; ?>>
    
    		<li<?php if(is_home()) { echo " class=\"current\""; } ?>><span><a href="<?php bloginfo('url'); ?>" title="<?php _e('Home','options'); ?>"><span><?php _e('Home','options'); ?></span></a></li>
    		<li><?php wp_list_pages('title_li='); ?></li>
    <li><a href="#"><span>Title</span></a></li>
    	</ul>
    
    	<?php if($op_search == __('True','options')) include(TEMPLATEPATH . '/includes/searchform.php'); ?>
    
    </div>
    </div>
    Code (markup):
    I have it set up so subpages become dropdown menus, so that might have something to do with it.

    All help appreciated! Thanks!
     
    Lpspider, Aug 5, 2008 IP