我有以下代码用于显示带有滚动结果部分的搜索工具。在 IE 中,代码工作正常:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html style="background:black;height:100%;width:100%;">
<head>
<title>Report</title>
</head>
<body style="background:black;">
<table HEIGHT="100%" WIDTH="100%" style="background:red;">
<tr>
<td>
Search Area
</td>
</tr>
<tr>
<td HEIGHT="100%" WIDTH="100%" style="background:orange;">
<div style="overflow-y:scroll;height:100%;">
<table style="width:100px;height:1000px;">
<tr>
<td style="background:white;">
Results Area
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
但是当我通过添加将元标记设置为使用 IE8 格式时:
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
底部的 DIV 标记扩展到页面之外。虽然我尝试了许多选项,但如果没有实际指定值的高度,就找不到解决方法。这不起作用,因为无论浏览器窗口的大小如何,我都希望页面占据 100% 的屏幕。
任何帮助将非常感激。