Hung PD
Hung PD

Reputation: 405

Nesting columns in Bootstrap 3

I would like to ask if would be correct the next code for nesting columns in Boostrap 3. I would like to remove the class .row

I'm trying to put columns into colums without the class .row between. At the moment the result is what I expect, but I don't know if in the future it will be a headache for me.

This is a example:

<div class="row">
  <div class="col-md-9">
    <div class="col-md-6"></div>
    <div class="col-md-6"></div>
  </div>
</div>

In addition, how can I remove padding of nested column because I need a little breathing room inside their div.

Thank in advance.

Upvotes: 4

Views: 1859

Answers (1)

DoXicK
DoXicK

Reputation: 4812

No, the correct code would be:

row
  column
    row
      column

As can be seen on the bootstrap documentation at "nesting columns".

To add a bit of padding in the columns, add an element inside them that adds a bit of padding

row
  column
    row
      column
        div.with-padding

Upvotes: 9

Related Questions