I have a html menu:
<ul>
<li><a href="#" class="active">Item one</a></li>
<li><a href="#">Item two</a></li>
<li><a href="#">Item three</a></li>
</ul>
and css:
ul li a{
color: black;
}
ul li a:hover, ul li a.active{ /* it was ul li a:hover for two times */
color: red;
}
When I'm hovering on a non-active element, there is two red elements and it is normal. The problem is changing color for hover-element only and removing it on active (turn to black). Is there any trick to do this without JS?
edited: there was an error. ctrl-c -> ctrl-v is evil
ul li a.active, ul li a:hoverrather thanul li a:hover, ul li a:hover?