Bootstrap Grids
We will design a basic grid system that begins stacked on extra tiny devices and becomes horizontal on larger ones.
The following example depicts a simple “stacked-to-horizontal” two-column layout, which results in a 50%/50% split on all screens except for particularly small screens, which are automatically stacked (100%):
Hello World!
Lorem ipsum...
Sed ut perspiciatis...
Tip: The values in the .col-sm-* classes represent the number of columns the div should span (out of 12). So, .col-sm-1 spans a single column, .col-sm-4 spans four columns, .col-sm-6 spans six columns, etc.
Make sure that the sum always equals 12!
Tip: To convert any fixed-width layout into a full-width layout, change the .container class to .container-fluid:
Hello World!
Lorem ipsum...
Sed ut perspiciatis...
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.