The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › transition not works
I have a simple code. https://codepen.io/mohammad983/pen/JjPmZow I want to change background of submenu class when we hover menu class
Hi,
You have to put div “submenu” inside “menu” and target the hover menu like this:
.menu:hover > .submenu { background-color: red; }
or
.menu:hover .submenu{ background-color: red; }