Grow your CSS skills. Land your dream job.

Last updated on:

Removing Dotted Outline

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. Permalink to comment#

    This works.

    a {
    outline-style: none;

  3. *:focus { outline: 0; }

  4. Court Kizer

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

  5. 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

  • Use Markdown, and it will escape the code for you, like `<div class="cool">`.
  • Use triple-backticks for blocks of code.
      <h1>multi-line block of code</h1>
      <span>be cool yo.</span>
  • Otherwise, escape your code, like <code>&lt;div class="cool"&gt;</code>. Markdown is just easier though.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".