Removing css from link image
Our designer created this 开发者_运维问答css for links
A
{
text-decoration: underline;
color: #E77C15;
}
A:link
{
text-decoration: underline;
color: #E77C15;
}
A:visited
{
text-decoration: underline;
color: #E77C15;
}
A:hover
{
text-decoration: underline;
color: #039;
}
A:active
{
text-decoration: underline;
color: #E77C15;
}
I need an image link with no border around it. Right now it has a border of the color from the css around it.
I have tried
<a href='myurl' style="border-style:none; text-decoration:none" >
<img src="myimage.png" style="width: 20px; height: 20px" alt="Remove" title="Remove" />
</a>
but the border still shows. How can I remove the border around this link image. Thanks!
You should add the CSS to <img>
, not to <a>
.
Better use a general CSS rule:
img { border:none }
a img { border: 0; }
Use border:none;
on the img
.
a img{
border:none;
}
Add the following rule to your CSS:
a img {
border: 0;
}
I'd encourage you, or your designer, to look into using CSS Reset Stylesheets.
Place this in your stylesheet:
a img {border:0px;}
The border is around the image, not the link.
Add:
a img {
border: none;
}
Try to add this to your CSS:
a img{ border:none; }
精彩评论