user3075987
user3075987

Reputation: 881

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?

Upvotes: 11

Views: 5130

Answers (2)

V. Sambor
V. Sambor

Reputation: 13409

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>

Upvotes: 1

Kirk Strobeck
Kirk Strobeck

Reputation: 18669

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>

Upvotes: 11

Related Questions