Search code examples
csscss-selectorspseudo-class

Why a:active pseudo class does not working


Am using css for some site. I noticed that the a:active style definition in my css file does not work at all. I was told by someone that I have to put the definitions in this order

a:link {...}
a:visited {...}
a:hover {...}
a:active {...}

I have done so but it's still not working. Please could someone tell me why it is not working and a possible workaround. Thanks


Solution

  • Here is a working example:

    http://jsfiddle.net/BMHUz/

    Click and hold on the anchor tag and you will see it turn orange.