Categories in Wordpress Nav Not Being Affected by Nav CSS?

Discussion in 'CSS' started by jhmattern, Oct 27, 2008.

  1. #1
    I just purchased a theme for a site I've been meaning to build - www.BizHow2.com

    As you can see there, in the top horizontal nav, the homepage link and pages have the correct style associated with them. I tried added categories there (ideally I'd like the top-level categories working, and then I'll possibly remove the pages from that nav).

    However, the category (just the test one for now) isn't obeying the rules set for list items in that nav area, and I'm not sure why. Here's the code for that section as I have it now:

    <div id="navi-in">
      <ul id="nav">
        <li   class="page_item"><a href="<?php echo get_option('home'); ?>/">Home</a></li> 
    <?php wp_list_pages('depth=1&sort_column=menu_order&title_li=' . ('') . '' ); ?>
    <?php wp_list_categories('orderby=name&title_li'); ?>
      </ul>
    </div>
    Code (markup):
    Any ideas as to what I'm missing?

    Thanks in advance.
     
    jhmattern, Oct 27, 2008 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It's because the styles are set for page_items and not everything inside the NAV.

    Try this, open style.css

    Find:

    Change this to:

    This should make the style generic for all items in the menu.
     
    wd_2k6, Oct 27, 2008 IP
  3. Funk-woo10

    Funk-woo10 Peon

    Messages:
    1,109
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    if you look at the source, the li class are not the same as the two working ones.

    You need to have the other li classes as -

    <li class="page_item page-item-2">FINANCE</li>
    <li class="page_item page-item-3">MANAGEMENT</li>

    ect, do you see what im saying ?

    Or make the css for cat item the same as page item.

    I hope that helps, I have it working in Firebug.
     
    Funk-woo10, Oct 27, 2008 IP
    jhmattern likes this.
  4. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #4
    I went with the first solution, and it seems to be working alright now. Thanks to both of you. :)
     
    jhmattern, Oct 27, 2008 IP