2016-12-20 59 views
0

我有一個頁面,我試圖將不同的div放在同一行,使用Bootstrap 3時沒有太大的運氣。我試圖將<div id="score">放在與<div id="info">相同的行上,但一個拉到左邊,另一個向右拉。任何人都可以告訴我如何做到這一點?我已經提出fiddle here謝謝Boostrap 3跨度問題

<div class="container"> 
    <div class="col-md-6"> 
    <small>Posted by: John</small> 
    <span class="pull-right"> 

<small>10-Dec-2016</small> 

<!----Place bottom two DIV's on same line, one pulled left and the other pulled right---> 
<div id="info">more info</div> 
<div id="score">Score - 10</div> 
</span> 
    </div> 
</div> 
+1

您可以使用嵌套引導程序的行/列添加col中的子列。 https://jsfiddle.net/8hjhpnLc/6/ – Dexter0015

回答

0

試試這個。 Bootply

<div class="container"> 
    <div class="row"> 
     <div class="col-md-6"> 
      <small>Posted by: John</small> 
     </div> 
     <div class="col-md-6"> 
      <small>10-Dec-2016</small> 
     </div> 
    </div> 
<!----Place bottom two DIV's on same line, one pulled left and the other pulled right---> 
    <div class="row"> 
     <div class="col-md-6"> 
      <div id="info">more info</div> 
     </div> 
     <div id="score" class="col-md-6">Score - 10</div> 
    </div> 
</div>