Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
XhmikosR edited this page Nov 1, 2014 · 3 revisions

E004

Containers (.container and .container-fluid) are not nestable

Bootstrap containers (i.e. .container and .container-fluid) cannot be nested.

Wrong:

<div class="container">
  <div class="container">
    ...
  </div>
</div>

Also Wrong (doesn't matter whether the container is fluid or not):

<div class="container-fluid">
  <div class="container-fluid">
    ...
  </div>
</div>

Still Wrong (descendants still count as nesting):

<div class="container">
  <div class="foobar">
    ...
        <div class="container">
          ...
        </div>
    ...
  </div>
</div>

Wrong Again (mixing the two types of container doesn't make it right):

<div class="container-fluid">
  <div class="container">
    ...
  </div>
</div>
Clone this wiki locally