使用this粘滯頁腳技術並給出this示例。如何獲得側邊欄來填滿空間?
* { margin:0; }
html, body { height:100%; }
#wrap {
min-height:100%;
height:auto !important;
height:100%;
margin:0 0 -47px;
}
#side { float:left; background:#ccc; width:100px; overflow:hidden; }
#body { float:left; background:#aaa; width:300px; }
#foot, .push { height:47px; }
#foot { background:#eee; }
您是如何使邊欄和/或內容框填充頁眉和頁腳之間的空間的?
我試過將高度設置爲100%,但它(並不令人驚訝)似乎並不需要。而且我不能設置一個固定的高度,因爲它仍然會在更大的屏幕上打破。
任何人都想闡明這一點?
編輯: 對於此問題選擇的答案不適用於具有半透明頁腳的設計。這裏顯示:http://jsfiddle.net/AfwzD/23/
因此,我想補充這個問題。你如何使它適用於這種類型的設計?
退房人造列了一個快速簡便的黑客:http://alistapart.com/article/fauxcolumns基本上,你要創建一個在父div的背景,使列看起來延伸到最高的div的全高。 – nathancahill