Bootstrap’s grid design supports up to 12 columns per page.
If you don’t want to use all 12 columns separately, you can join them together to make larger columns:
Bootstrap’s grid architecture is responsive, and the columns re-arrange automatically based on screen size.
The Bootstrap grid system includes four classes:
The classes listed above can be combined to produce more dynamic and adaptable layouts.
The following is the fundamental structure of a Bootstrap grid:
...
First, build a row (<div class=”row”>). Then, include the necessary number of columns (tags with the appropriate .col-*-* classes). Remember that the numbers in .col-*-* should always add up to 12 for each row.
Below are some examples of basic Bootstrap grid layouts.
The following example demonstrates how to achieve three equal-width columns beginning with tablets and scaling to huge desktops. On mobile phones or devices that are less than 768 pixels wide, the columns will automatically stack:
.col-sm-4
.col-sm-4
.col-sm-4
The example below demonstrates how to achieve two columns of varying widths that begin at tablets and expand to huge desktops:
.col-sm-4
.col-sm-8
Tip: You will learn more about Bootstrap grids later in this tutorial.
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.