2017-06-06 108 views
0

有沒有可能使Bootstrap很好地靠近在一起?刪除Bootstrap WELL填充左右

我試過clearfix但仍然沒有運氣。

我所試圖做的事: enter image description here 我的代碼:

<div class="container"> 
    <div class="row"> 
     <div class="col-md-4"> 
      <div class="well"> 
       <p>Write Something Here</p> 
      </div> 
     </div> 

     <div class="col-md-4"> 
      <div class="well"> 
       <p>Write Something Here</p> 
      </div> 
     </div> 

     <div class="col-md-4"> 
      <div class="well"> 
       <p>Write Something Here</p> 
      </div> 
     </div> 
    </div> 
</div> 

任何幫助將不勝感激!

+0

我_guess_要消除柱填充...? – CBroe

+1

這是你想要的https://codepen.io/chandrashekhar/pen/QgbWqz?editors=1010 –

+0

@CBroe喜歡如何?你可以給我一個例子嗎?填充:0 -30px? – R3y

回答

0

在這裏你可以在左邊的&右邊改變2px來獲得它們之間所需的距離!

<style> 
    .wellcontainer .col-md-4{ 
    padding-left:2px; 
    padding-right:2px; 
} 
</style> 
<div class="container wellcontainer"> 
    <div class="row"> 
     <div class="col-md-4"> 
      <div class="well"> 
       <p>Write Something Here</p> 
      </div> 
     </div> 

     <div class="col-md-4"> 
      <div class="well"> 
       <p>Write Something Here</p> 
      </div> 
     </div> 

     <div class="col-md-4"> 
      <div class="well"> 
       <p>Write Something Here</p> 
      </div> 
     </div> 
    </div> 
</div> 
1
<div class="container"> 
    <div class="row"> 
     <div class="col-md-4 well"> 
       <p>Write Something Here</p> 
     </div> 

     <div class="col-md-4 well"> 
       <p>Write Something Here</p> 
     </div> 

     <div class="col-md-4 well"> 
       <p>Write Something Here</p> 
     </div> 
    </div> 
</div>