这是为了密集显示状态信息。最好我想让图像互相碰撞。多余的空白从哪里来?如何关闭图像表中的空间?
这里是产生的表格内容是这样的:
<table>
<tr>
<td><small>anim-dept</small></td>
<td>
<a href="http://foo/bar">
<img height="24" width="32" src="http://foo/bar.jpg">
</a>
</td>
....
这是为了密集显示状态信息。最好我想让图像互相碰撞。多余的空白从哪里来?如何关闭图像表中的空间?
这里是产生的表格内容是这样的:
<table>
<tr>
<td><small>anim-dept</small></td>
<td>
<a href="http://foo/bar">
<img height="24" width="32" src="http://foo/bar.jpg">
</a>
</td>
....
将TABLE
的CELLSPACING
和CELLPADDING
设置为零。
请注意,您可能需要向第一个表格行单元格添加填充样式。
<table cellspacing="0" cellpadding="0">
<tr>
<td><small>anim-dept</small></td>
<td>
<a href="http://foo/bar">
<img height="24" width="32" src="http://foo/bar.jpg">
</a>
</td>
....
使用border-collapse:collapse
在CSS的表作为
table{
border-collapse:collapse;
}
或只针对一个特定表如下与编号images
table#images{
border-collapse:collapse;
}
或者(如果你没有CSS)
<table cellspacing="0">
DEMOS:without border-collapse和with border-collapse和without css but cellspaacing
您还应该明确设置表格{width:0px;}和td {padding:0; border:none}以覆盖任何浏览器本机样式。 – 2012-08-03 00:24:21
我同意并假设/猜测已经有'css rules'应用于此,但是谢谢,'OP'会从评论中获得一个想法! – 2012-08-03 00:28:38
这可能不是最佳的解决方案,但我能够解决这个问题加入:
tr {
display:inline-block;
height:24px;
}
css border-collapse: collapse
似乎只适用于列,行仍然有间距。将行设置为内联块而不是表行可以解决这个问题,但正如我所说的那样,这可能不是最好的解决方案。
你可以显示表格的其余部分和任何相关的CSS?具体显示起始表格标签。 – Jrod 2012-08-03 00:00:42
已更新...表格中没有任何内容,并且没有css,因为这是从模板生成的。 – 2012-08-03 00:29:39