Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Keep Parent Item Active when Child Element is Current Page – CSS/WordPress Re: Keep Parent Item Active when Child Element is Current Page – CSS/WordPress

#106991
wolfcry911
Participant
#main-nav .current_page_parent a {
background: red;
}

What to note here is that the background is on the anchor – not the li; and that it needs a high specificity (it needs the id in the descendant selector) to override the default background