Grid System
For example, let’s say you want a site that has:
- 1 column on extra small devices
- 2 columns on small AND medium devices
- 4 columns on large devices
<div class="row"> <div class="col-sm-6 col-lg-3"> This is part of our grid. </div> <div class="col-sm-6 col-lg-3"> This is part of our grid. </div> <div class="col-sm-6 col-lg-3"> This is part of our grid. </div> <div class="col-sm-6 col-lg-3"> This is part of our grid. </div> </div>
We don’t have to define anything for extra small devices since the default is one column. We have to define a grid size for small devices, but not for medium devices. This is because the grid cascades up. So if you define a size at sm
, then it will be that grid size for sm
, md
, and lg
.
Source:
http://scotch.io/bar-talk/understanding-the-bootstrap-3-grid-system
Spalte 1
Spalte 2
Spalte 3
Spalte 4