How to use the Row class in bootstrap?

Asked

Viewed 12,243 times

6

I have two questions:

1st - In bootstrap it is mandatory to use the "Row" class to wrap the columns?

2nd - I can have more than 12 columns within the same class "Row"?

Example:

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

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

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

    </div>
</div>
  • 1º is not required, EX: if you want to fill a row (Row) just md6 + md6 = md12 - 2º until I know the maximum of columns is 12

1 answer

5


According to the twitter documentation Bootstrap the answers to your questions are the following:

  1. In bootstrap it is 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 which is defined by padding and is corrected in .row with negative margins. So it is not mandatory but there will be the correction of the padding of the columns.

  1. I can have more than 12 columns within the same class "Row"?

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. Excess columns will fall to the next row.


EDIT

Bootstrap 3 grids system tutorial suggested by @Renilsonandrade.

  • Just completing the answer, this article: http://webdevacademy.com.br/tutoriais/ux/bootstrap-3-layouts-sistema-grids/ has an easy-to-understand explanation of Bootstrap layouts and grids.

  • I’ll add the reply @Renilsonandrade. Thanks!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.