This is a general question. Typically, the current page is highlighted on a nav menu bar. However, if the current page is a child of a parent menu item, only the child is highlighted. The parent is not. Is it possible to highlight both the child and its parent? Thanks.
Of course, you can highlight anything you like on a page. The parent element will just need an appropriate class applied to it, and styling applied to that class.
The standard class to use for this is “current”, so the HTML may be like:-
<li class="current">
And CSS:-
.current {
color: red;
background: white;
}
If the sub menu is nested within the parent, you will have to watch the specificity, probably put a class on the sub menu, to not highlight all sub items (unless you want that).