Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing blue outline/border from image anchor IE

To start off, I don't even know what this is. I tried text-decoration: none, border: none, outline: 0, and nothing seems to work? My CSS file is working all right, so it's not that?

Here's a picture: http://i38.tinypic.com/rbgv3k.jpg

<div id="links">
  <span id="user"><a id="link" href="register.php"><img src="images/user.png"/></a></span>
  <span id="follow"><a id="link" href="https://twitter.com/itsybitsycom"><img src="images/follow.png"/></a></span>
  <span id="about"><a id="link" href="about.html"><img src="images/about.png"/></a></span>
  <span id="stats"><a id="link" href="profile.php"><img src="images/stats.png"/></a></span>
</div>

CSS

#link {
  text-decoration:none;
  border:0;
  outline:none;
}
like image 552
Sidetik Avatar asked Apr 23 '13 19:04

Sidetik


People also ask

How do I eliminate the blue border around linked images?

define border-style:none; in your CSS code for image. Using border="0" in image tag, this is worth for internet explorer. Apply border:none; css hope it will work out.. If not check out the css which is adding border, and try to override with your custom class.

How do I remove the border from an image tag?

Adding border="0" to your img tag prevents that picture from having a border around the image. However, adding border="0" to every image would not only be time consuming but also increase the file size and download time. To prevent all images from having a border, create a CSS rule or file with the following code.

How do I get rid of the border on Internet Explorer?

add style="border: none;" to whatever creates the border or create a css with this attribute.


3 Answers

try adding following to your CSS

img{ border:0 }
like image 51
Ejaz Avatar answered Oct 25 '22 23:10

Ejaz


IE adds a border around images if they’re the child of an anchor. You can remove this by setting the border to none:

a img {
      border: none;
}
like image 31
David Storey Avatar answered Oct 26 '22 00:10

David Storey


a{
    outline: none !important;
 }

Worked for me.

like image 27
Richard Guy Avatar answered Oct 25 '22 23:10

Richard Guy