Treehouse: Grow your CSS skills. Land your dream job.

[wordpress] parent menu highlight when in sub-menu page

  • # June 29, 2013 at 12:22 pm


    I’m trying to get a child page to highlight it’s parent in a main menu. The link is below.
    What I’m trying to achieve is when you click on the parent menu link it goes straight to it’s sub-menu option 1. If you then go to sub-menu option 2, the parent link should still be highlighted.

    I’ve tried using

    .current-page-ancestor a {
    color: black;

    with no luck.

    Hopefully this makes sense. Does anyone know how I can achieve this?

    Thanks in advance.

    # June 29, 2013 at 1:27 pm

    In your css you have

    .menu a {bunch of styles}

    Add this

    .menu, .menu {



    to your anchor on every page you want your text in parent navigation to be black

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

You must be logged in to reply to this topic.