我在左側354px的頁面底部有一個固定位置的DIV。 我需要DIV填充頁面的剩餘寬度。我怎樣才能做到這一點?由於CSS-用固定位置填充頁面的剩餘寬度DIV
看一看圖像...
http://www.freeimagehosting.net/uploads/a1b6e2946e.gif
編輯
<html>
<head>
<style type="text/css">
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td
{
margin: 0;
padding: 0;
}
#Container{
width:100%;
height:100%;
background-color:gray;}
#sidebar{
width:354px;
height:100%;
position:fixed;
left:0px;
top:0px;
background-color:orange;}
#toolbar{
height:40px;
width:100%;
position:fixed;
bottom:0px;
margin-left:354px;
background-color:blue;
text-align:right;color:white}
</style>
</head>
<body>
<div id="container">
<div id="sidebar"></div>
<div id="toolbar">
Demo text
</div>
</div>
</body>
</html>
這是一個大的網站有很多CSS和HTML這會搞亂事情,所以我已經添加的什麼,我試圖做一個小小的演示。 注意當文本設置爲對齊div的右側時,工具欄div中的文本不可見。我只是在屏幕上填充了重新渲染的寬度。 1)是 2)兩者都是。 – Jess 2010-07-01 08:00:03