Home › Forums › CSS › Make parent link inactive when submenu item is active › Reply To: Make parent link inactive when submenu item is active
March 22, 2017 at 6:38 pm
#253055
Mottie
Member
Hi @neeta!
Sadly, there are no parent selectors in css (see this post). The easiest option would be to always target the parent when adding and removing classes. For example, add a “child-1-active” or “child-2-active” and a “active” class to the parent when a child is active.
Or, maybe I misunderstood your question. If so, please provide an example on CodePen… include any relevant HTML, CSS and any javascript please.