Jul
10

Hide the dotted border around links in Firefox

By Sam  //  Mozilla Problems  //  5 Comments

Today I had a client that wanted to remove the dotted borders that appeared around the anchors on her site when she clicked on them. At first I had no idea what she meant as I’m so used to them but she was insistent.

Luckily there’s a nice easy way to hide the border (or ‘outline’):


a:hover, a:active, a:focus, a:active{
outline: none;
-moz-outline-style: none;
}

The second line there just targets older versions of Firefox.

5 Comments to “Hide the dotted border around links in Firefox”

  • Hi!

    Thanks! Hard to find the answer, but here it is. I use it at http://develop.jenst.se in some places.

    /Jens

  • [...] The code is heavily inspired by CSS Hints. [...]

  • Perfect. Thanks!

  • Hi,
    Your code is perfect on IE8 and Mozilla. But, when I checked it on IE7 and IE6, it’s not working. Can you please help me?
    Thanks.

  • There shouldn’t be any borders in IE?

Leave a comment

Sponsored links