私はしばらくの間このサイトに取り組んでおり、物事をうまく機能させようとしていますが、役に立ちません. 私がやりたいのは、両端の 2 つの列を固定して、3 列のサイトを作成することです。ただし、コンテンツがその高さをオーバーフローするかどうかに基づいて、中央の 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;
}
ブラウザのサイズを変更すると、固定されたコンテンツ、特に右側のコンテンツが消え、水平スクロールがなくなります。私はまた、相対的に配置された a に固定のものを配置しようとしましたdiv
が、ブラウザのサイズが変更されて中央の div に流れると、コンテンツは動き始め(col_two)
ます。これに関するすべての助けに本当に感謝します。ありがとう。