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!
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
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!
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
Thank you, this worked perfectly. Much appreciated. You can mark this as solved.