I am using the :active selector to attempt to style links whilst the mouse button is pressed against them.
This works fine in cool browsers, however IE 8/7 (The only versions I can test with) manage to show the style however the element keeps it’s :active styling after the button is depressed and the :active style also fires when the element has keyboard :focus (I believe this is the same bug as the element gets keyboard :focus after it is clicked).
Does anyone know a non-javascript work around?
A live example can be seen at: http://rcnhca.org.uk/sites/first_steps/communication/ (Try the buttons below the breadcrumb navigation).
There is no way to get
:activeworking as you want it in IE7. If you can get it to work with javascript then that would be your best bet. IE8 and 9 should work perfectly in your example page above, it certainly seems to from my end. Other implementations of:activemay not work as expected, such as in nested elements, but in your case it seems to work fine.See http://www.quirksmode.org/css/contents.html for information on compatibility.