April 12, 2009 | In: how-to, snippet, Tips & Tricks, Web development

How to remove the blue border around an image link

[ad#only_in_post]

You want to use an image as a link.However, a blue border appears around the image.

This border is meant to inform users that the image is a link. Well, it’s a link but this is ugly :s and may not fit your need.
[ad#hire_me]

Solution

  1. You simply have to add a border-style, set to none, as a style to your img tag
  2. A cleaner way, that will pass the W3C validation, is by adding those lines to your CSS file :
  3. A dirty old way, but works, is by adding border attribute to the img tag.

Comment Form

Categories