aladine
aladine

Reputation: 983

Active links' color change in IE6 and FireFox

I make link buttons on sidebar of a web page. It will change color if I click the button. It works well in IE6 but not Firefox. Anyone can advise me how to make it on in FF. Million thanks.

Here are parts in css and html body:

.sidenav li a:active {
    background: #cff;
    color: blue;


}

....

<div class="sidenav">
<ul>
    <li><a href="..." ></a></li>
</ul>

Upvotes: 0

Views: 419

Answers (2)

kamasheto
kamasheto

Reputation: 1030

a:active is a link that has not been clicked yet. Once you click it, it's categorized under a:visited. a:hover, as implied, is a category for links hovered over.

Most of the time you should have a:active and a:visited styled the same way, unless you want to distinguish between previously clicked links and other unclicked links.

Upvotes: 0

DanielGibbs
DanielGibbs

Reputation: 10193

It depends what you are trying to achieve.

Do you want it to be coloured when the user hovers over it? Or change colour permanently once they have clicked it?

Try using a:visited or a:hover.

Upvotes: 2

Related Questions