Web Design Blog

This is where we store some of our Web Development thoughts, tips and tricks, just because we like to share.

How To Remove Dotted Border From Links In Firefox

I’ve noticed that a lot of websites have an unexpected dotted border around links in Firefox. A lot of the times you can get away with it because it doesn’t look too odd (depending on your CSS). However, I’ve seen cases when it looks pretty odd.

Here’s an example:
Dotted link border in Firefox

I’ve actually taken that screenshot from a web design agency website (which is ironic). Everytime I click on a link, that odd border appears, and stretches across the entire screen.

The Fix

The fix is pretty simple. In your CSS stylesheet just add the following few lines under your CSS global declarations (at the top of your stylesheet). That will ensure that none of your links will suffer from the problem.

1
2
3
4
a:active
{
outline: none;
}

14 Aug 2008 / 1 Comment / CSS Tips & Tricks / by Maruf

1 Comment

  1. Alex
    11/02/2010
    1

    The 100% working fix is:

    a:active, a:active * { outline: none !important; -moz-outline-style: none !important; }
    a:focus, a:focus * { outline: none !important; -moz-outline-style: none !important; }

Leave a Reply

© 2012 BrightCherry :)