Support » Themes and Templates » MAIN NAV HIGHLIGHTING ALL SUB-MENU LINKS

  • angschmidt

    (@angschmidt)


    #header-menu .current_page_item a,
    #header-menu .current_page_ancestor a {
    color:#0f47a6;

    }

    I need your help! I have tried a bunch of combinations, but I cannot get the sub-menu links to not all highlight. I have top level navigation and sub level menus. When a click on a top level link — it will turn blue and all of the sub-menu links turn blue also. What can I do to fix this current page highlighting?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you have a link to your site, it will be easier to debug.

    Okay to fix it, you’ll need to make a small change in your CSS file, which you can either edit locally and upload it via FTP, or you can edit it via the WordPress Admin.

    So go to that file, and around line 142 you should find this declaration:

    #header-menu .current_page_item a,
    #header-menu .current_page_ancestor a {
        color: #0F47A6;
    }

    Basically what that does is change the color of the text to the blueish color you’re using, on any links that are part of the current page. So to make it only happen on the top link, you’ll need to make one small change:

    #header-menu .current_page_item > a,
    #header-menu .current_page_ancestor a {
        color: #0F47A6;
    }

    Just add the > in the first line and this will make it target only the first links.

    Thanks man, that helped me alot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘MAIN NAV HIGHLIGHTING ALL SUB-MENU LINKS’ is closed to new replies.