我最近一直在为一个非常愚蠢的问题头痛。为什么我不能让分隔这两个框的单元格以9px的速度正确显示??我已经做了几次数学运算,结果出来了,但是在单元格中,箭头指向它,它增加了额外的高度:
实际上,我看起来是它设置的9像素高度的两倍(大约18像素)。为什么??这没道理。
<!-- BIG WRAPPER TABLE FOR CENTRAL CONTENT -->
<table width="700px" border="0" cellspacing="0" cellpadding="0" class="homepage">
<tr align="center">
<td>
<table width="681" height="451" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td rowspan="3" bgcolor="#FF66CC">Image will go here</td>
<td rowspan="3" width="9"> </td>
<td height="221" width="221" bgcolor="#3f7583">Text will go here</td>
</tr>
<tr height="9">
<td height="9" width="221" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td height="221" width="221" bgcolor="#CC0000">Image will go here</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- END BIG WRAPPER TABLE -->
最佳答案
这是因为你的td
<td height="9" width="221" bgcolor="#FFFFFF"> </td>
当以正常字体大小呈现时,它取
的高度,只需移除它,它就可以工作了。这里是working fiddle
关于html - <tr>高度显示不正确,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13276360/