WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 3 menu markup greyed out in firebug (3 posts)

  1. wp-user-487
    Member
    Posted 1 year ago #

    Greetings,
    I am testing WordPress 3's menu feature. I am trying to figure out how the active page or category can be highlighted in the menu, following the following resources:

    1. Design Philosophy
    2. This forum post
    3. The menu appears fine ( I can see the list). But when I use firebug, I can see that both the active and inactive

    4. s are greyed out (thus I can't figure out what CSS classes should apply as there is no active list item).

      <div class="menu-header-menu-container">
      <ul id="menu-header-menu" class="menu">
      <li id="menu-item-7958" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-7958">
      <a href="http://www.example.com/dev">Home</a>
      </li>
      <li id="menu-item-7959" class="menu-item menu-item-type-taxonomy menu-item-object-category current-menu-item menu-item-7959">
      <a href="http://www.example.com/dev/category/events/">Events</a>
      </li>
      </ul>
      </div>

      Your help is very appreciated. Thanks!

  2. wp-user-487
    Member
    Posted 1 year ago #

    Sorry, formatting problem there. What I wrote was, the menu appears fine ( I can see the list). But when I use firebug, I can see that both the active and inactive list items are greyed out (thus I can't figure out what CSS classes should apply as there is no active list item). Thanks!

  3. wdalhaj
    Member
    Posted 1 year ago #

    current-menu-item refers to current active menu item, notice this class in the second list item. So, you can use it to apply custom css to the the current menu item.

    .current-menu-item{
    background:#0099dd;
    font-weight:bold;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic