我一直在這個網站上工作了一段時間,試圖讓事情爲我工作,但無濟於事。我想要做的是做一個三列的網站,兩個結束列是固定的。但是中心div應該根據內容是否溢出其高度來滾動。
貝婁是HTML如何製作帶有兩個固定側欄的三欄式頁面
<div id="main_body">
<div id="accord_menu">
Left Navigation Accordion
</div>
<div id="col_two">
There is no knowledge that is not power
</div>
<div id="col_three">
<div id="inner">
Here is the right navigation
</div>
</div>
<br class="clear"/>
</div>
,這裏是我到目前爲止所使用的CSS:
#accord_menu{
height: auto;
width: 150px;
position:fixed;
margin-left:3px;
margin-top: 53px;
padding-top: 20px;
}
#col_two{
width: 600px;
height: 1000px;
border: 1px solid #AAA;
background: #E6E6FA;
position:relative;
}
#col_three{
width: 200px;
height: auto;
max-height: 92px;
min-height: 91%;
position:fixed;
margin-left:900px
margin-top: 53px;
background: #E6E6FA;
}
當我調整瀏覽器,固定內容消失,尤其是正確的,並且會有對它沒有水平滾動。我也嘗試將固定位置放置在相對定位的div
中,當瀏覽器調整大小時,內容開始移動並流過中心div (col_two)
。我非常感謝所有幫助。謝謝。
所以呢?你有沒有發現它? – nouveau
不,我想要的是固定列的Facebook國王,但後來我意識到JavaScript可能是我需要的 –
解釋。我們的答案怎麼樣並沒有完成這個?腳本會爲您提供什麼? – nouveau