2014-04-20 118 views
0

我设法减少blogger.com表的同一行图像之间的空白空间,但我不能为我的生活弄清楚如何减少图像行之间的空白区域。以下是我目前拥有的HTML。有什么建议么?HTML:需要帮助减少图像表行之间的空白

<table border="0" cellpadding="0" cellspacing="5" style="width: 900px;"> <tbody> 
<tr><td valign="top" width="209"> 

<img src="URL" height="130" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px width="200"/> 

... 

<img src="URL" height="130" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px width="200"/> 

</tbody></table> 

回答

1

你都错过了你没有关闭"width="200"
</td>
你没有关闭</tr>
你有cellspacing="5" - 改为cellspacing="0"

这里是你的代码与更正

<table border="0" cellpadding="0" cellspacing="0" style="width: 900px;"> <tbody> 
<tr><td valign="top" width="209"> 

<img src="URL" height="130" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px" width="200" /> 

<img src="URL" height="130" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px" width="200"/></td></tr> 

</tbody></table> 

这里是的jsfiddle

工作

Demo Of Above Code

+0

编辑答案,因为我最初只是张贴的网址jsfiddle,但没有具体的链接[http://jsfiddle.net/NM64L/](http://jsfiddle.net/NM64L/) –

+0

不客气。如果此解决方案适用于您,请单击左侧的灰色复选标记。另外,欢迎来到StackOverflow :) –

0

你已经归零上的图像的边框和填充用代码,但有可能是利润。尝试调整margin-top,margin-bottom等。

图像是全部在一个表格单元格还是在单独的表格单元格中? cellspacing =“5”将增加单元格之间的间距,并且他的表格单元格可以添加填充。

尝试将您的网页载入您的浏览器的网浏览器。我并不确定IE是否有效,但Firefox和Chrome都有办法查看选定节点上的所有边距,填充等。

+0

尝试了将margin-top和margin-bottom归零的建议,但它没有效果。我还调整了细胞间距为0的广告Sanuel建议。 – user3553148