The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Removing Dotted Outline

Last updated on:
a {
   outline: 0;

Be careful removing outline styles from links, as they are a usability feature. If you do, make sure to define clear focus styles.

If your problem is that the dotted outlines travel all the way to the left or right of the screen because they are floated, try setting the overflow to hidden.


  1. elandy2009
    Permalink to comment#

    A note: The “outline” CSS property doesn’t work in IE6 and IE7.

  2. Chris
    Permalink to comment#

    This works.

    a {
    outline-style: none;

  3. Miguel Mendez
    Permalink to comment#

    *:focus { outline: 0; }

  4. Court Kizer

    Outline: 0 none; <– Use this for perfect outline kill, every…single…time

  5. Karl Groves

    It is important to remember that if you remove this outline, you should replace it with something else. I recommend using both the :focus and :hover pseudo-classes as a means of providing this important feedback to both mouse and keyboard-only users.

Leave a Comment

Posting Code

We highly encourage you to post problematic HTML/CSS/JavaScript over on CodePen and include the link in your post. It's much easier to see, understand, and help with when you do that.

Markdown is supported, so you can write inline code like `<div>this</div>` or multiline blocks of code in in triple backtick fences like this:

  function example() {
    element.innerHTML = "<div>code</div>";

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed