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
July 29, 2012 at 10:12 pm
#106991
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