Search code examples
cssdrop-down-menuhovertextcolor

Change text color of menu items, ONLY on hover


I have a site here

At the top of the screen, you'll see a menu. Hover onto "Everything" and you'll see a sub-menu.

When you hover over an item, you'll see a dark grey background on each menu item. The text stays red, and I want the text to be white on hover.

Here's what I have so far...

#nv-tabs ul li ul li:hover {background: #252525!important; }

It looks like the text color (on hover) should also be in this div id, so I've tried this...

#nv-tabs ul li ul li:hover {background: #252525!important;color: #FFFFFF;}

...but it's not working.

Not sure where I'm going wrong here.


Solution

  • Try

    #nv-tabs ul#dyndropmenu.menu li ul.sub-menu li a:hover {
        color:white !important;
    }
    

    ^ should make the text white on hover while the other texts stay red.