This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 312
E014
Herst edited this page Oct 21, 2018
·
4 revisions
Bootstrap's grid system requires that grid columns must be children of grid rows (or .form-group
s, because they extend .row
in the Less source).
Wrong:
<div class="my-random-thing">
<div class="col-sm-6">...</div>
<div class="col-sm-6">...</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-12">...</div>
<!-- You can't nest columns directly like this. This is missing a level of .row -->
</div>
</div>
Right:
<div class="row">
<div class="col-sm-6">...</div>
<div class="col-sm-6">...</div>
</div>
<div class="form-horizontal">
<div class="form-group">
<div class="col-sm-6">...</div>
<div class="col-sm-6">...</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-12">...</div>
</div>
</div>
</div>
Bootstrap's grid system requires that grid columns must be children of grid rows or .form-row
s.
Wrong:
<div class="my-random-thing">
<div class="col-sm-6">...</div>
<div class="col-sm-6">...</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-12">...</div>
<!-- You can't nest columns directly like this. This is missing a level of .row -->
</div>
</div>
Right:
<div class="row">
<div class="col-sm-6">...</div>
<div class="col-sm-6">...</div>
</div>
<div class="form-horizontal">
<div class="form-group">
<div class="col-sm-6">...</div>
<div class="col-sm-6">...</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-12">...</div>
</div>
</div>
</div>
Bootlint documentation wiki content is licensed under the CC BY 3.0 License, and based on Bootstrap's docs which are copyright Twitter, Inc.