我試圖給我的網站設置一個適合屏幕的應用程序,但是我遇到了一些問題,我知道CSS在基本方面的來龍去脈,但是我有點困惑使用百分比。我需要一個標題(50像素),然後我需要一個盒子(高度100%),然後是一個小盒子頁腳(20像素),但是這一切都需要在屏幕上沒有溢出,當我嘗試與給定的代碼我得到一個溢出,因爲100%的項目將頁腳壓下導致溢出滾動條。CSS高度百分比規範
<div id="holder"> <-- this is set to 100% width & height as well as html, body
<div id="header">
</div>
<div id="inner_holder"> <-- This is the holder which is 100%
</div>
<div id="footer">
<div/>
</div>
聽起來像你需要Google css +粘性頁腳? – FiveTools