0
我遇到了表格问题,即使未设置边框并将其设置为0,它也会在表格中显示线条。Gyazo.com链接和代码如下所示。HTML表格边框
http://gyazo.com/661ce70e62c77e882f85b02c4d330316(网页截图)
<style type="text/css"><!--
table.affs td { background-color: white; margin: 12px 12px 12px 12px; padding: 25px 25px 25px 25px; } table.affs { border-collapse: separate; border-spacing: 10px; *border-collapse: expression('separate', cellSpacing = '15px'); }
--></style>
<table class="affs" style="background-color: #ffffff;" width="700px" border="0" cellspacing="2">
<tbody>
<tr>
<td><a href="http://www.kia.com" target="_blank"><img alt="" src="http://www.squareone.co/images/affiliates/kia.PNG" /></a></td>
<td><a href="http://www.google.com" target="_blank"><img alt="" src="http://www.squareone.co/images/affiliates/google.png" /></a></td>
<td><a href="http://www.youtube.com" target="_blank"><img alt="" src="http://www.squareone.co/images/affiliates/youtube.png" /></a></td>
<td><a href="http://www.nike.com" target="_blank"><img alt="" src="http://www.squareone.co/images/affiliates/nike.png" /></a></td>
</tr>
<tr>
<td><a href="http://www.jaguarpc.com" target="_blank"><img alt="" src="http://www.squareone.co/images/affiliates/jagpc.png" /></a></td>
<td><a href="http://www.duxter.com" target="_blank"><img alt="" src="http://www.squareone.co/images/affiliates/duxter.png" /></a></td>
<td><a href="http://www.sixpackshortcuts.com" target="_blank"><img alt="" src="http://www.squareone.co/images/affiliates/sps.png" /></a></td>
<td><img src="http://www.squareone.co/images/affiliates/baeza-grey.png" href="" /></td>
</tr>
<tr>
<td><img src="http://www.squareone.co/images/affiliates/dani.png" href="" /></td>
<td><img src="http://www.squareone.co/images/affiliates/roton-grey.png" href="" /></td>
<td><img src="http://www.squareone.co/images/affiliates/talib-grey.png" href="" /></td>
</tr>
</tbody>
</table>
目前我使用的是最新版本的Chrome在Windows 7和8,我也试图在IE 9和十对Windows 7和8,分别。我也在SafariChrome中的Mac OS X Lion上测试过它。不知道为什么它这样做。
你能提供css代码吗? – sylwia 2013-05-03 21:43:47
我看到一些图像的边框,但IE 10和Chrome 26的表格看起来很好:http://jsfiddle.net/SvbKt/。不相关,但'href'不是HTML 4或HTML 5中的有效'img'属性。 – 2013-05-03 21:49:48
刚注意到了,谢谢。 – user2348450 2013-05-03 22:03:42