tags:

views:

62

answers:

1

I'm trying to stop Firefox from adding an outline when links are clicked or followed (a:active).

I don't want to get rid of the outline on a:focus, because as we all know that's a kick in the nuts for keyboard only users.

In theory, the following should work:

a:active { outline: 0; }

But it does absolutely nothing in Firefox 3.5.3

The only thing that does work is:

a:focus { outline: 0; }

But as said, that's no good for accessibility reasons.

Is there any way at all of only removing the outline when links are clicked? My fear is that when you click on the link, you are in effect focusing it, and it's the focus style that's being applied, but focusing and clicking should really be two separate events.

+1  A: 

Here you go.

http://sonspring.com/journal/removing-dotted-links

or try this one.

http://www.elctech.com/snippets/css-remove-dotted-outline-border-from-active-links

Daniel A. White
That code has no effect on the current release of Firefox. See a demo here: http://benbodien.info/code/linktest.html
bbodien
This link in the comments on that second link has the answer. http://haslayout.net/css-tuts/Removing-Dotted-Border-on-Clicked-LinksYou can't stop the outline from appearing when you click a link without also removing it from :focus, because when you click, you also :focus. Unless you use some JavaScript that is.
bbodien