I am messing around with a pure CSS dropdown menu and I’ve noticed that when you hover over the top <li> element, it shows the button style, but when you hover over the child <li> element in the dropdown menu, the top <li> element retains the “button state”. I want the “button state” of the parent <li> element to be gone when I hover over any of the items in the dropdown menu. Here is the jsfiddle:
I am messing around with a pure CSS dropdown menu and I’ve noticed that
Share
The
:hoverpseudo-selector applies to elements even if child element is hovered. I can suggest you to apply the “button styles” to the<a>element in the top<li>s.instead of
jsFiddle Example