E014 - Herst/bootlint-ng GitHub Wiki

Note: Below is the original page from the Bootlint documentation, some of the info here might not apply to Bootlint-NG!


E014

Columns (.col-*-*) can only be children of .rows or .form-groups

Bootstrap's grid system requires that grid columns must be children of grid rows (or .form-groups, 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>
⚠️ **GitHub.com Fallback** ⚠️