Dezinerfolio

Most useful CSS Attribute

Your rating: None Average: 4.3 (12 votes)

This CSS property is the most wanted snippet for any Web Developer. Here you will learn how to remove the ugly dotted outline around <a> tags on-click state.

I figured this out some time ago and I am sure not all the developers will not have known this property and this is because I find this ugly dotted outline around all the <a> tags on almost every site I have visited.

You would have found this even on my site till yesterday, but now it seems to be more pleasant for me too without the outline.

Here is a comparison of an <a> tag on my site. Preview is on-click state

a tag hack

Here is what you have to add in the CSS...

/* CSS Document */

a { outline:none; }

Note: This works on Firefox and not for IE. I have not tested on other browsers.

As simple as that. Give it a try on any of your site... I am sure it will look more pleasing.

Trackback URL for this post:

http://www.dezinerfolio.com/trackback/189

Comments

Anonymous's picture

Great!

Cheers

Arnold (not verified)
Wed, 07/16/2008 - 09:01
Anonymous's picture

Huh! I never knew this. Thanks! :-)

Ben (not verified)
Thu, 04/03/2008 - 04:52
Anonymous's picture

Thanks.
Have been looking for this.

DeviantIllusionz (not verified)
Mon, 03/31/2008 - 19:44
Anonymous's picture

Im using the next string in tags'

onFocus=this.blur();

and its working in ALL browsers

SinCabeza (not verified)
Sat, 07/21/2007 - 09:34
Anonymous's picture

Thanks.
It's very useful for my homepage.

Minhaj (not verified)
Mon, 06/18/2007 - 21:34
Anonymous's picture

but with me this code did not function. it could say what I have that to make necessarily?
Thank You!!!

S. Costa (not verified)
Tue, 06/05/2007 - 19:45
Anonymous's picture

im using this code.. n its works fine on ie7 n firefox..

xeroxaven (not verified)
Tue, 06/05/2007 - 17:32
dfadmin's picture

@S. Costa - If I am not wrong, this code works only for firefox.

Tue, 06/05/2007 - 15:53
Anonymous's picture

I put this code on my style.css but don't work on Firefox. You can help me, please!!!

S. Costa (not verified)
Tue, 06/05/2007 - 09:34

Post new comment

The content of this field is kept private and will not be shown publicly.

Visualize