Parent in active state in the menu

Community Forums Forums Design Tips and Tricks Parent in active state in the menu

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  jazzybazz 1 year, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #53489

    jazzybazz
    Participant
    Post count: 12

    Hello,

    I am using the Enterprise theme. When I am on a page that appears on the menu, the menu button for the page is in the active state (background color changes)

    However when I go to a page child to the parent, the parent in the menu is not in the active state. I would like it to be in the active state.

    Here’s an example of what I’m talking about: http://goo.gl/rpvOBu
    “Expertise” in the menu should be in the active state.

    http://goo.gl/rpvOBu
    #53504

    Derek
    Participant
    Post count: 46

    This might be what you are looking for. Add this to your style.css:

    #nav li.current-page-ancestor a,
    #nav li li.current-page-ancestor a {
        background: none repeat scroll 0 0 #FFF;
        color: #000;
    }

    Derek Rippe – CSS Artist & Genesis Fanboy @ SynaVista and MediaCairn Design Studio
    Figure out your CSS problems with Firebug | Check out my Custom Comment Form Title plugin

    #53518

    jazzybazz
    Participant
    Post count: 12

    thank you very much Derek. It works good. there is still one more thing I need to fix.

    The code you wrote selects the ancestor in the menu but not the direct parent.

    See for example this page: http://goo.gl/aawVqo

    The path of this page is Services ==> Expertise ==> this page
    ==> means “is the parent of”

    As you can see, the menu label “Services” (the ancestor) is in the active state which is part of what I wanted, but how to make “Expertise” active as well?

    I tried copying and pasting your entire code a second time but with replacing ancestor by parent but it did not work.

    Thank you very much

    • This reply was modified 1 year, 3 months ago by  jazzybazz.
    • This reply was modified 1 year, 3 months ago by  jazzybazz.
    #53522

    jazzybazz
    Participant
    Post count: 12

    I did it by copy pasting your code a second time, but replacing #nav by #subnav. Now everything works as expected. Thank you very much for your help.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.