How to use row class in bootstrap?

4

I have two questions:

1st - In the bootstrap is it necessary to use the "row" class to wrap the columns?

2nd - Can I have more than 12 columns within the same "row" class?

Example:

<div class="row">
    <div class="col-md-12">

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

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

    </div>
</div>
    
asked by anonymous 12.03.2015 / 15:35

1 answer

3

According to Twitter Bootstrap documentation the answers to your questions are as follows:

  • In bootstrap is it mandatory to use the "row" class to wrap the columns?
  •   

    Columns create gutters (gaps between column content) via padding. That padding is offset in rows for the first and last column via negative margin on .rows.

    That is, all columns have a "span" between them that is defined by padding and is fixed in .row with negative margins. Then it is not required but there will be no correction of the padding of the columns.

  • Can I have more than 12 columns within the same "row" class?
  •   

    If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.

    That is, yes, it can. The surplus columns will fall to the next line.

    EDIT

    Tutorial on Bootstrap 3 grids suggested by @ RenilsonAndrade.

        
    12.03.2015 / 15:48