In a previous question I asked (and later worked out) how to style sub menus, I want to expand on that with another question related to styling sub-menus.
I have hit an issue were if the parent is the selected page all child pages pick up the same styling, I believe this is because the current-menu-item
class gets added to the parent li.
If a child element is selected only the child is highlighted (which is correct)
Has anyone encountered this before? What is the best way to only have the selected page highlighted and not the child elements of that page?
As requested, here is the CSS that is being called to highlight the child menu.
.current-page a, .current-menu-item a {
background-color: #EE8833;
}
.first-menu-parent-item ul > .current-menu-item { /* style first element */ }
.el > child
type selectors(which won't work in some browsers, namingly IE)..