26

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

6 回答 6

32

try adding following to your CSS

img{ border:0 }
于 2013-04-23T20:05:51.897 回答
15

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;
}
于 2013-04-23T20:05:41.217 回答
7
a{
    outline: none !important;
 }

为我工作。

于 2014-09-12T09:04:31.423 回答
3

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;
}
于 2013-04-23T20:05:25.710 回答
3
#link img a
 {
 border:0;
 outline:none;
 }
于 2013-08-22T06:36:29.977 回答
1

你应该可以用这个 CSS 做到这一点:

border-style: none;
于 2013-04-23T20:01:03.093 回答