Disable anchor dotted border

2010-01-16 @ 14:30

In Firefox, and maybe other browsers, there is a border around the anchor (link) element when it’s clicked. Sometimes it can be annoying, especially when using Javascript onclick function.

You can however get rid of this dotted anchor border by disable it in CSS.

Example

This example will disable the dotted anchor border in every anchor (link) elements, as long as it’s not overwritten by other CSS code.

a:focus {
     outline: none;
}

The code is heavily inspired by CSS Hints.

RSS-feed for comments

6 replys to “Disable anchor dotted border”

  • benny »
    2009-11-26 @ 2:40 e m

    many thanks, for some bizarre reason this also got rid of the blue border of a linked img that was just refusing to go away no matter what CSS i threw at it!

    Reply
  • Harlan Peaden »
    2010-05-05 @ 3:22 f m

    not too shabby, thank you

    Reply
  • JD
    2010-05-17 @ 2:00 e m

    Much thanks. This is just what I was looking for.

    Reply
  • Frank8u0
    2010-10-02 @ 11:19 e m

    Thanks man, simple and clean. amazing little thing.

    Reply
  • BD
    2010-11-05 @ 10:56 e m

    this does not work in IE 8, FF 3.6 nor any version of Opera. bummer

    Reply
  • Prasanna
    2010-11-14 @ 7:09 f m

    Thanks a lot , I goggled for 2 hours to find the solution finally got it here.

    Reply

Leave a reply