【发布时间】:2019-02-15 15:50:20
【问题描述】:
我有一些 HTML 可以在 FireFox3/Opera/Safari 上正常显示,但不能在 IE7 上显示。 sn-p如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body bgcolor="#AA5566" >
<table width="100%">
<tr>
<td height="37" valign="top"><img style="float:right;" border="0" src="foo.png" width="37" height="37"/></td>
<td width="600" rowspan="2" >
<table width="600" height="800"><tr><td><img src="bar.jpg" width="600" height="800"/></td></tr></table>
</td>
<td height="37" valign="top"><img style="float:left;" border="0" src="foo.png" width="37" height="37"/></td>
</tr>
<!-- This row doesnt fill the vertical space on IE7 //-->
<tr>
<td valign="top" bgcolor="#112233"> </td>
<td valign="top" bgcolor="#112233"> </td>
</tr>
</table>
</body>
第二行不会正确填充由第一行中间列创建的垂直空间(注意 rowspan="2")。相反,即使我将它们的高度设置为 37,第一行和第三列也会向下扩展。下图显示了 IE7 和 Firefox3 中发生的情况...
编辑:将 HTML 文档类型添加到代码片段中。添加了截图。
感谢任何帮助,谢谢:)
【问题讨论】:
-
你使用的是什么文件声明?
-
Chris:刚刚将其添加到代码片段中。
标签: html firefox internet-explorer-7