我有以下代码:CSS定位与IE8 - 表达不支持
<html>
<head>
<style type="text/css">
DIV#left
{
z-index: 100;
position:absolute;
left:0px;
top:0px;
width: 100px;
height: 100px;
background-color: #e7e7e7;
}
DIV#right
{
z-index: 100;
position:absolute;
left:100px;
top:0px;
width: 100px;
height: 100px;
background-color: #e20074;
}
</style>
</head>
<body>
<div id="left">
1
</div>
<div id="right">
2
</div>
</body>
</html>
但我需要正确的DIV部分扩大到页面(宽度= 100%)的结束 因此,这里是我如何改变宽度为DIV#右:
width: expression(parseInt(document.body.offsetWidth)-100);
不幸的是,这不适用于IE浏览器! IE8和Firefox忽略表达式。我怎样才能克服这个问题?
非常感谢提前!
哦,不,现在您必须设计正确的网页! – Welbog 2010-09-29 15:54:59