Removing blue outline/border from image anchor IE

坚强是说给别人听的谎言 提交于 2019-11-27 15:38:23

问题


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;
}

回答1:


try adding following to your CSS

img{ border:0 }



回答2:


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;
}



回答3:


a{
    outline: none !important;
 }

Worked for me.




回答4:


You need to add the CSS to the image, not to the link. Instead of #link, you need to use #link img as the selector.

Then border:none; should work for you.

#link img {
    border: none;
}



回答5:


#link img a
 {
 border:0;
 outline:none;
 }



回答6:


You should be able to do it with this CSS:

border-style: none;


来源:https://stackoverflow.com/questions/16178078/removing-blue-outline-border-from-image-anchor-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!