删除链接中图像下方的线条 [英] Remove line under image in link
问题描述
我有几个实例,我在一个链接中放置图像。通常如果您设置border =0,那么链接下的线不适用于图像。但是,我必须指定DOCTYPE为 ,现在在FF我看到所有图像下的行。
I have a few instances where I place image within a link. Normally if you set border="0" there line under a link does not apply to the image. However, I had to specify DOCTYPE to be and now in FF I see the line under all images.
我仍然想要我的
<a href="link.php"><img src="img.png" height="16" width="16" border="0"> link</a>
我试图通过添加
a img {
text-decoration:none
}
不幸的是它没有工作。我也试过:
Unfortunately it did not work. I also tried:
a img {
border:0
}
IE不会在链接中下划线我的图片...任何建议将高度赞赏。
IE does not "underline" my images within a link... Any suggestions would be highly appreciated.
>
我仍然希望我的链接下划线,但不是其中的图片。
I still would like to have my links underlined, but not the images within.
推荐答案
case任何人关心,这里是一个替代解决方案,我想出来规避这个问题:
In case anyone cares, here's an alternative solution that I came up with to circumvent the issue:
.nl {
text-decoration:none;
}
<a href="link.php" class="nl"><img src="img.png" height="16" width="16" border="0"><u>link</u></a>
这篇关于删除链接中图像下方的线条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!