</td>不换行表格没有空隙,为什么</td>换行后就会有空隙,像素在1-3,反正不是原来的样子了
为什么?
Visual Studio格式化过的:
<td height="30">
<img src="images/a1.gif" width="17" height="30" />
</td> <td align="left" style="background: url(images/a1_4.gif) repeat-x;">
<table width="100%" height="30" border="0" cellspacing="0" cellpadding="0">
. . .
</table>
</td> <td align="left">
<img src="images/a4.gif" width="17" height="30" />
</td>
原来的静态页面:
<td height="30">
<img src="images/a1.gif" width="17" height="30" /></td>******************注意这句话****************** <td align="left" style="background: url(images/a1_4.gif) repeat-x;">******************这个td格式化也不会出现问题,可以忽略******************
<table width="100%" height="30" border="0" cellspacing="0" cellpadding="0">
. . .
</table>
</td> <td align="left">
<img src="images/a4.gif" width="17" height="30" /></td>******************注意这句话******************
为什么?
Visual Studio格式化过的:
<td height="30">
<img src="images/a1.gif" width="17" height="30" />
</td> <td align="left" style="background: url(images/a1_4.gif) repeat-x;">
<table width="100%" height="30" border="0" cellspacing="0" cellpadding="0">
. . .
</table>
</td> <td align="left">
<img src="images/a4.gif" width="17" height="30" />
</td>
原来的静态页面:
<td height="30">
<img src="images/a1.gif" width="17" height="30" /></td>******************注意这句话****************** <td align="left" style="background: url(images/a1_4.gif) repeat-x;">******************这个td格式化也不会出现问题,可以忽略******************
<table width="100%" height="30" border="0" cellspacing="0" cellpadding="0">
. . .
</table>
</td> <td align="left">
<img src="images/a4.gif" width="17" height="30" /></td>******************注意这句话******************
但是浏览的话我是IE9没空隙,但是美工说她的IE6有问题
最后找到
<td height="30">
<img src="images/a1.gif" width="17" height="30" />
</td>
改成
<td height="30">
<img src="images/a1.gif" width="17" height="30" /></td>就好了
你们也可以试一下,我把美工给我的静态页面也试过,因为美工是Dreamweaver写的HTML
td都是这样子的
<td height="30"><img src="images/a1.gif" width="17" height="30" /></td>
这样是没有问题的,你们把</td>换行一下,就会有空隙了。你们可以试试。