Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make space between Bootstrap columns?

I have a two column row in bootstrap. How do I create space between the columns. - My first col is 8, but I want to make it 7 and have 1 column as just space.

Here's my bootply: http://www.bootply.com/mwGajBOEVe

Here's my HTML.

<div class="container">
    <div class="row">
        <div class="col-md-8">
            <p>The apple tree (Malus domestica) is a deciduous tree in the rose family best known for its sweet, pomaceous fruit, the apple.</p>
        </div>
        <div class="col-md-4"">
        The orange (specifically, the sweet orange) is the fruit of the citrus species Citrus × sinensis in the family Rutaceae.</div>
    </div>
</div>

Should I create empty columns to do this?

like image 247
user3075987 Avatar asked May 04 '16 23:05

user3075987


2 Answers

No, use offsets like this

<div class="row">
  <div class="col-md-4">.col-md-4</div>
  <div class="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div>
</div>
<div class="row">
  <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
  <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
</div>
<div class="row">
  <div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>
</div>
like image 110
Kirk Strobeck Avatar answered Nov 17 '22 23:11

Kirk Strobeck


you can do like this:

<div class="container">
    <div class="row">
        <div class="col-md-7 col-md-offset-1">
            <p>Join our growing</p>
        </div>
        <div class="col-md-4"">
        </div>
    </div>
</div>
like image 43
V. Sambor Avatar answered Nov 17 '22 23:11

V. Sambor