I have this CSS on my WordPress website that will change the font-size to 2em of the main navigation menu items when hovering. What I need is to make it so that it remains with that font-size while going to the sub-items. Is there a way to achieve this inside of WordPress?
.menu a:hover {
font-size:2em !important;
transition-duration: all .2s !important;
}
That is the code I'm using right now, and I added the main menu items that .menu class.
I gave the sub-items a .submenu-item class. So what I researched is that using something like this could do the trick:
.submenu-item:hover + .menu-about {
font-size:2em !important;
transition-duration: 0.05s;
}
But it doesn't. I've tried using > and ~ and neither of those worked. Is there a way to do it?
Thanks a lot in advance!