這可能工作:
HTML
<div id="wrapper">
<div id="left-column"></div>
<div id="right-column"></div>
</div>
<div id="footer">
</div>
CSS
body, html {height:100%; padding:0; margin:0;}
#wrapper {height:100%; padding:0 0 60px 260px; box-sizing:border-box; -moz-box-sizing:border-box;}
#left-column {width:260px; margin-left:-260px; float:left; height:100%; background-color:red; overflow-y:scroll;}
#right-column {width:100%; float:left; height:100%; background-color:blue; overflow-y:scroll;}
#footer {height:60px; position:fixed; bottom:0; left:0; width:100%; background-color:green;}
http://jsfiddle.net/rGBAt/1/
目前它的overflow-y設置爲滾動,但你可能想要添加他使用的jquery,所以它並不總是在Chrome瀏覽器中添加滾動條,我不確定它是否與Twitter引導程序兼容
該版本增加了溢出當內容變得太大:
http://jsfiddle.net/rGBAt/7/
美麗。謝謝皮特。使用jQuery顯示/隱藏滾動條並將overflow-y設置爲auto有什麼區別? – 2013-02-15 08:14:21
有些瀏覽器如chrome會顯示滾動條,即使它們在使用溢出滾動優先級時沒有溢出,使用jquery方式,只會在內容延伸太遠時才顯示它們 – Pete 2013-02-15 08:54:16
非常感謝。我認爲我更關注Jrod的解決方案,不涉及任何JavaScript,但是純HTML/CSS。你在哪裏看到利弊? – 2013-02-18 07:15:38