【发布时间】:2015-01-09 18:05:00
【问题描述】:
为什么下面的 html 生成一个 2x2 单元格而不是 3 行的表格,第一个有 2 个单元格,接下来的 2 个有一个单元格跨越 2 个?
<table cellpadding="5" width="200">
<tr>
<td><img id="Button1_logoImg" src="" style="height:75px;width:75px;" alt="sButton1_logoImg" /></td><td><img id="Button1_errorImg" src="" style="height:50px;width:50px;" alt="Button1_logoImg" /></td>
</tr>
<tr>
<td width="100%" rowspan="2"><input name="Button1$mainTextTb" type="text" value="changed" id="Button1_mainTextTb" style="font-size:20pt;width:180px;" /></td>
</tr>
<tr>
<td rowspan="2" width="100%"><span id="Button1_subTextLbl" style="font-size:12pt;">sub text</span></td>
</tr>
</table>
【问题讨论】:
-
因为第 2 行的行跨度为 2?
-
天哪 - 我需要第二行跨越表格的宽度,即 2 个单元格。
标签: html html-table row cell