Tagged: ,

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

    Hi there,

    I’m working on a website that requires distinct hover and active colors for each parent page. All child pages must also inherit the hover and active color of their parent page. I’ve managed to style this so that it works in the main menu, but my sidebars continue to pick up the theme default color. Can you suggest what I can try? Thanks in advance!

    #785797

    Hey 1lizcollins,

    Try using this css code:

    #top.parent-pageid-xxxx .sidebar a {
        color: #000 !important;
    }

    just replace xxxx with the page id of the parent page and adjust the color as you see fit. Hope this helps :)

    Best regards,
    Nikko

    #785822

    Thank you so much for your speedy reply – you guys are amazing!

    This code changed the color of all sidebar child menu items; I only want their colors to change on hover or when active. I changed the code to `#top.parent-pageid-xxxx .sidebar a:hover {
    color: #000 !important;
    }` which worked for the hover but I can’t get the active part working. Thoughts? And thanks!

    #786327

    Hi 1lizcollins,

    Try this code and let us know if it helped:

    
    #top.parent-pageid-xxxx .sidebar li.current_page_item a {
        color: #000 !important;
    }
    

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #789709

    Thank you, this worked perfectly. Much appreciated. You can mark this as solved.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Set hover and active colors for all children of a parent page’ is closed to new replies.