Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4025

    Hi there Kriesi,

    I’m creating a website using your Broadscope theme. I would like to highlight the main menu item when I’m on a sub-menu. Is there CSS or Javascript that can let me do this? For example I would like the menu item /wine/ to be highlighted in the main navigation when I’m on the sub-page /wine/varieties-and-tasting-notes/.

    Please help!!!

    Thanks!

    #44645

    Hey,

    try to add following code to custom.css (located in the folder css):

    .current-menu-ancestor, .current-menu-parent{
    background: #000;
    color: #fff;
    }

    Adjust the color values as you like. I’m not sure if it works with all menu items though (because of the impact the mega menu has on the menu link classes).

    #44646

    Thanks for the fast reply! Not working for me though. Is there any other method you know of?

    Thanks again!

    #44647

    All good! Your suggestion worked in this way:

    .current-menu-parent a, .current-menu-ancestor a {

    color: #7dca8d;

    }

    Thank you!

    #44648

    Glad that I could help you :)

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

The topic ‘How to make the parent menu item active when on a subpage’ is closed to new replies.