• 0

CSS menu item hover color - can this be done with CSS?


Question

Hello,

I have the following drop down menu. As you can see, when you hover over an item (ie, Products), the font color becomes darker (as does the background drop down icon). However, once you then go down and hover over one of the sub menu items, the color of the main Products reverts to the light color (obviously, there is no li:hover any more).

So, is there a way to keep the Products darker while hovering over the sub menu?

Sorry if i worded that badly!

Cheers

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Try this at the bottom of menu.css:

ul.menu li.dropdown:hover > a:visited,
ul.menu li.dropdown:hover > a:link {color: #000;}

The reason it wasn't working previously is because any colour defined for the list was overwritten with colour definitions for the link.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.