以下是我的代码。问题是每当我使用宽度大于td:ed(1)的float元素时。这需要额外的空间。我很感激你的建议。
<table style="background:#ff0;border:1px solid #ccc; width:100%">
<tbody>
<tr>
<td style="width:30px; border-right:1px solid #ccc; overflow:hidden">1</td>
<td>Test</td>
</tr>
<tr >
<td colspan="2"><input type="text" /></td>
</tr>
</tbody>
</table>
以下是屏幕截图。
的Mozilla alt text http://www.freeimagehosting.net/uploads/90956a921b.png
IE7
alt text http://www.freeimagehosting.net/uploads/df583f0d36.png
答案 0 :(得分:1)
我找到了答案。 对于IE我添加了css属性
表 { 表格的布局:固定; }
这解决了我的问题。
感谢。