下面的代码不工作在IE工作。尽管事实上它设置为left:0px
和right:0px
,但DIV并未跨越整个页面。根据调试器,Body元素有很大的宽度。DIV绝对定位不IE
为什么?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div align="center" style="position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; background-color: red">
Some text
</div>
</body>
</html>
哇。你为什么这么做?只需将您的身体bg设置为红色即可。大声笑 – 2011-12-28 08:20:26
这是真正的任务提取。 – Dims 2011-12-28 08:24:50