3つのブートストラップ列が隣り合っています。私は左と右の列が静的で、中央の列のみがスクロールする必要があります。ブートストラップの左右の列を静的にする方法
私は列を固定してみましたが、列の幅が変わり、右の列を固定すると、ページの左側に移動します。
固定属性なしで固定する別の方法はありますか?
ここは私のページの画像です。固定
<div class=" col col-sm-2 leftBar" style="padding: 10px;">
<div style="padding: 10px 10px; border-radius: 5px; background-color: #87CEEB;">
<div class="list-group">
<a href="#" class="list-group-item active">List <span class="badge">4</span></a>
<a href="#" class="list-group-item"> List Item 1</a>
<a href="#" class="list-group-item"> List Item 2</a>
<a href="#" class="list-group-item"> List Item 3</a>
<a href="#" class="list-group-item"> List Item 4</a>
</div>
</div>
</div>
<div class=" col col-sm-8 centreContent" style="padding: 10px;">
<div style="padding: 10px 10px; border-radius: 5px; background-color: #DCDCDC;">
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
<p>This is the content</p>
</div>
</div>
<div class=" col col-sm-2 rightBar" style="padding: 10px;">
<div style="padding: 10px 10px; border-radius: 5px; background-color: #87CEEB;">
<p>This is the Right Bar</p>
</div>
</div>
RightBarを右に置くと、固定された位置は問題ありません。 https://jsfiddle.net/9zgeqv3s/と中央列のブートストラップオフセット –
Thanx @ GL.awog。これは私が望むように働いた。私はそれを受け入れることができるように答えとして投稿してください。 – Damian