I run into this issue with almost every site I build, and half the time it magically fixes itself and half the time it doesn't. I have a nav with black text, the hover is a purplish colour, and I want the "current" page to have the purplish colour too. The issue is that the "current" page text stays black, not the purple I want it to be. Arrrgggg. Any ideas? I don't care about comments regarding the rest of my code, it's just this one issue I'm looking for feedback on. Thanks!
HTML:
(I've put the id="current" in the li as well as the a, and get the same result both times)
CSS:
HTML:
Code:
<div id="nav">
<ul>
<li id="current"><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Whatever</a></li>
<li><a href="#">Whatever</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div><!--/nav-->
(I've put the id="current" in the li as well as the a, and get the same result both times)
CSS:
Code:
#nav ul li a{
color:#000;
text-decoration:none;
text-transform:uppercase;
font-size:15px;
font-weight:bold;
}
#nav ul li a:hover{
color:#5959ab;
}
#current{
color:#5959ab;
}