Twitter Bootstrap 3 WordPress Starter Theme for Developers

Home Community Support Make parent menu display active style

This topic contains 3 replies, has 3 voices, and was last updated by  BrosDase 4 years, 1 month ago.

  • Author
  • #262


    I’m trying to make the parent menu item highlight as active but nothing seems to work. I see similar problems on this site… for instance, Forums Home makes Forums menu active, and [shortcodes] > how to use them makes [shortcodes] appear active (white with background) but the other child menus don’t.

    Any help appreciated.

    FYI: I tried to copy your CSS with Firebug from these two instances with one change as I’m using .navbar-default …like this:

    .navbar-default .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus {
    background-color: #080808;
    color: #ffffff;

    …..but this gets completely ignored for some reason

  • #263


    It is an odd behavior Nick. I’m not sure what causes it.

    The active class isn’t being added to the parent menu item. First I thought it was any item but the “First ” that wasn’t adding the class but if you click, “Components -> Theme Files” Components doesn’t get the active class added like it does when you go “Forums -> Forum Home” or “[shortcodes] -> How to use them.”

    So I don’t have a good answer for you right now. I suppose if it was really crucial you could try some jquery trickery to do something like “If this item has the class active -> crawl all the way up the tree and add the class to the parent li past the next ul.” Something like that anyway.

    I’m working on an update for the latest bootstrap in a couple weeks. I’ll add this to my list to look into.

  • #264


    finally resolved this issue using the following CSS:

    .current_page_parent > a {
    color: #FFF !important;

  • #501


    Green Day is a famous country singer, so don’t miss the possibility to visit Green Day tour baltimore

You must be logged in to reply to this topic.