Tutorial by Examples

We use the following media queries in our Less files to create the key breakpoints in our grid system. /* Extra small devices (phones, less than 768px) */ /* No media query since this is the default in Bootstrap */ /* Small devices (tablets, 768px and up) */ @media (min-width: @screen-sm-min) ...
What is Bootstrap Grid System Bootstrap grid system provides the quick and easy way to create responsive website layouts. Bootstrap 3 includes predefined grid classes for quickly making grid layouts for different types of devices like cell phones, tablets, laptops and desktops, etc. For example, ...
Using a single set of .col-md-* grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any .row. <div class="row"> ...
Turn any fixed-width grid layout into a full-width layout by changing your outermost .container to .container-fluid. <div class="container-fluid"> <div class="row"> ... </div> </div>
Don't want your columns to simply stack in smaller devices? Use the extra small and medium device grid classes by adding .col-xs-* .col-md-* to your columns. See the example below for a better idea of how it all works. <!-- Stack the columns on mobile by making one full-width and the other half-...
Build on the previous example by creating even more dynamic and powerful layouts with tablet .col-sm-* classes. <div class="row"> <div class="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div> <div class="col-xs-6 col-md-4">...
If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line. <div class="row"> <div class="col-xs-9">.col-xs-9</div> <div class="col-xs-4">.col-xs-4<br>Since 9 + 4 = 13 ...
With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a .clearfix and our responsive utility classes. <div class="row"> <div ...
Move columns to the right using .col-md-offset-* classes. These classes increase the left margin of a column by * columns. For example, .col-md-offset-4 moves .col-md-4 over four columns. <div class="row"> <div class="col-md-4">.col-md-4</div> <div cla...
To nest your content with the default grid, add a new .row and set of .col-sm-* columns within an existing .col-sm-* column. Nested rows should include a set of columns that add up to 12 or fewer (it is not required that you use all 12 available columns). <div class="row"> <di...
Easily change the order of our built-in grid columns with .col-md-push-* and .col-md-pull-* modifier classes. <div class="row"> <div class="col-md-9 col-md-push-3">.col-md-9 .col-md-push-3</div> <div class="col-md-3 col-md-pull-9">.col-md-...
In addition to prebuilt grid classes for fast layouts, Bootstrap includes Less variables and mixins for quickly generating your own simple, semantic layouts. Variables Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use ...

Page 1 of 1