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 25, 2012 at 6:39 pm
#106772
Member
Wordpress adds the super helpful selectors that do that for you. Try doing this:
.current_page_parent {
// parent styling here
}
.current_page_item {
// child styling here
}
This should work for any page that you’re on.
Edit: After looking at your css, it looks like you’re actually already using those selectors, however you’re not coloring their backgrounds, only the text. So if you use those along with background it might help out?