我正在创建一个简单的时事通讯,所以我决定使用一个 700 像素宽的表格,并阻止我的表格的顶部弄乱我在它下面创建了另一个具有相同宽度(700 像素)的表格。由于某种原因,上半部分在使用 TD 时更改为 705 像素,如果我将其设置回 700 像素,它就太窄了,即使下面的表格是 700 像素宽。
您可以看到灰色框上的宽度变化:
<table width="700" border="0" cellspacing="0">
<tr>
<th height="19" colspan="6" bgcolor="#E9E9E9" scope="row"> </th>
</tr>
<tr>
<th height="130" colspan="2" bgcolor="#E9E9E9" scope="row"><img src="sides_wider.png" width="63" height="1" /></th>
<th width="345" height="130" align="left" valign="bottom" bgcolor="#E9E9E9" scope="row"><img src="logo.png" width="200" height="100" align="bottom" /></th>
<th width="221" height="130" align="right" valign="bottom" bgcolor="#E9E9E9" scope="row">Newsletter #1 - <strong>05.08.13</strong>
<th width="63" height="130" colspan="2" bgcolor="#E9E9E9" scope="row"><img src="sides_wider.png" width="63" height="1" /></th>
</tr>
</table>
<table width="700" border="0" cellspacing="0">
<tr>
<th height="2" colspan="6" bgcolor="#E9E9E9" scope="row"></th>
</tr>
<tr>
<th width="50" height="47" bgcolor="#E9E9E9" scope="row"><img src="sides.png" width="50" height="1" /></th>
<th colspan="4" rowspan="2" align="center" valign="top"><img src="banner.png" width="600" height="200" /></th>
<th width="50" bgcolor="#E9E9E9"><img src="sides.png" width="50" height="1" /></th>
</tr>
<tr>
<th width="50" height="79" bgcolor="#FFFFFF" scope="row"> </th>
<th width="50" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="50" height="147" rowspan="2" bgcolor="#FFFFFF" scope="row"> </th>
<th width="35" rowspan="2" bgcolor="#FFFFFF"> </th>
<th width="196" height="40" bgcolor="#F3F3F3" style="padding:15px">Lorem ipsum dolor sit amet, dolor accusata duo ut. </th>
<th width="330" height="40" bgcolor="#E5E5E5" style="padding:15px">Lorem ipsum dolor sit amet, dolor accusata duo ut. </th>
<th width="33" rowspan="2" bgcolor="#FFFFFF"> </th>
<th width="50" rowspan="2" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th bgcolor="#F3F3F3" height="40" style="padding:15px; border-top: solid 1px #CCC">Lorem ipsum dolor sit amet, dolor accusata duo ut. </th>
<th width="330" height="40" bgcolor="#E5E5E5" style="padding:15px; border-top: solid 1px #CCC">Lorem ipsum dolor sit amet, dolor accusata duo ut. </th>
</tr>
<tr>
<th height="16" colspan="6" bgcolor="#FFFFFF" scope="row"> </th>
</tr>
</table>