我想創建一個全屏的CSS佈局。全屏的CSS佈局
<div id="divLeft">LEFT is ok</div>
<div id="divRight">
<div id="divTop">TOP is ok</div>
<div id="divCenter">CENTER should have liquid height</div>
<div id="divBottom">BOTTOM should be always bottom</div>
</div>
CSS
html{
height:100%
}
body{
height:100%
}
#divLeft{
float:left;
width:70px;
height:100%;
background:#6c9;
}
#divRight{
margin-left:70px;
height:100%;
background:#999;
color:#fff;
}
#divTop{
background:red;
text-align:right;
}
#divCenter{
background:blue;
text-align:center;
}
#divBottom{
background:green;
text-align:center;
}
那麼,問題出在#divCenter
(應該有液體高度)和#divBottom
(應在屏幕的底部總是)。
像這樣的事情? http://jsfiddle.net/gpwD4/5/ – Adrift
@SunSky嘗試與'position:absolute'和底部0px像http://jsfiddle.net/Bonaca/gpwD4/4/ ..Adrift小提琴好多了:) – swapnesh
@Adrift漂亮的工作,你應該把它作爲回答:) – Praveen