- Bootstrap’s grid system allows up to 12 columns across the page
Grid Classes
The Bootstrap grid system has four classes:
xs
(for phones- screens less than 768px wide)
sm
(for tablets- screens equal to or greater than 768px wide)
md
(for small laptops- screens equal to or greater than 992px wide)
lg
(for laptops and desktops- screens equal to or greater than 1200px wide)
Basic Structure of a Bootstrap Grid
The following is a basic structure of a Bootstrap grid:
<div class="row">
<div class="col-*-*"></div>
<div class="col-*-*"></div>
</div>
<div class="row">
<div class="col-*-*"></div>
<div class="col-*-*"></div>
<div class="col-*-*"></div>
</div>
<div class="row">
...
</div>