我有以下代碼: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