今天发现一个问题:上下两个表格中间有大约5象素的间距。
代码是这样的
<!--head-->
<div align="center">
<table width="778" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="images/head.gif"></td>
</tr>
</table>
</div>
<!--end head-->
<!--menu-->
<div align="center">
<table width="778" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="images/menu_1.gif" width="8" height="37" alt=""></td>
<td>
<img src="images/menu_2.gif" width="668" height="37" alt=""></td>
<td>
<img src="images/menu_3.gif" width="13" height="37" alt=""></td>
<td>
<img src="images/menu_4.gif" width="67" height="37" alt=""></td>
<td>
<img src="images/menu_5.gif" width="22" height="37" alt=""></td>
</tr>
</table>
</div>
<!--end menu-->
最后经过调试,终于发现是因为head中image的宽度和高度没有设定。改成下面的代码即可。
<!--head-->
<div align="center">
<table width="778" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="images/head.gif" width="778" height="98" alt=""></td>
</tr>
</table>
</div>
<!--end head-->
<!--menu-->
<div align="center">
<table width="778" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="images/menu_1.gif" width="8" height="37" alt=""></td>
<td>
<img src="images/menu_2.gif" width="668" height="37" alt=""></td>
<td>
<img src="images/menu_3.gif" width="13" height="37" alt=""></td>
<td>
<img src="images/menu_4.gif" width="67" height="37" alt=""></td>
<td>
<img src="images/menu_5.gif" width="22" height="37" alt=""></td>
</tr>
</table>
</div>
<!--end menu-->
如果还有间隔的话,把<td><img src="" width="" height=""></td> 中间不要留空格。