1
我在我的single.php
頁面有一個WordPress主題。下面遵循HTML代碼:如何使用Bootstrap clearfix清除浮點數?
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
<div id="single-post">
single post content
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div id="sidebar-area">
sidebar area
</div>
</div>
</div>
</div>
CSS代碼:
#single-post,
#sidebar-area {
margin:10px auto;
background: #fff;
border: 1px solid #d7d7d7;
padding: 15px;
}
圖像呈現
當我的一個帖子的內容高度比側欄區域較短,一些側邊欄小部件將轉到單個內容區域下。 如何通過使用Bootstrap clearfix
類來顯示側邊欄區域中的所有側邊欄小部件?
使用引導電網,使您投入4山坳格將在這裏和8(左任何內容)和4(邊欄)collums的div和一切都無所謂了多久會你的側邊欄。也許我只是不明白你的問題 - 對不起 - 但爲什麼你想使用clearfix? – Northys 2014-11-06 23:40:31
簡單的例子,應該幫助你 - 如果我瞭解你http://www.bootply.com/teLpSeImf6 – Northys 2014-11-06 23:46:34