How to get rid of "box" around linked images?

Options

When I link an image (donate buttons, registration buttons etc.) sometimes a box is put around that image when you look at the page.  In IE it is purple and in Firefox it is blue.  Does anyone know why it is doing that, and how do I get rid of it?

Thanks,

Malin

Tagged:

Comments

  • What you're describing sounds like the default behavior of linked images. To override that default, you just need to add the following style somewhere in one of your wrapper's stylesheets:

    a img{

    border:0;

    }

  • Noah Cooper:

    What you're describing sounds like the default behavior of linked images. To override that default, you just need to add the following style somewhere in one of your wrapper's stylesheets:

    a img{

    border:0;

    }

    Thank you!  I will try that.

  • Malin Borg:

    Thank you!  I will try that.

    I believe its actually...

    outline: none;

    "Bear in mind that this styling literally uses the “outline” CSS  property. Outline is very similar to the “border” property, with two important differences. One, outline goes around the  entire object (much like using just “border”), but you may not be  specific about sides. “Outline-left” does not exist. Two, the  outline value is not a part of the box model. Border is  calculated into the total width of the box, whereas outline is not. This  is important so that layouts don’t get bumped around when the outline  is applied and removed."

    http://css-tricks.com/removing-the-dotted-outline/

    Regards, Brian

Categories