Bootstrap is
using grid system to assign width to html element. This gird system is based on
12-equal-units, means grid is like a container which consist of 12-logical
units.
If we want to divide our page into 2 equal
parts then we can use this grid-system by assigning 6-logical units to each
part of the page, and it can be done with the help of CSS class (.col-xx-N)
CSS class being used for grid system is of the
forms ".col-xx-N" where "xx" denotes the screen size
"N" denotes the no. of logical unit
There are 4
different kind of "xx" based on your screen size
col-lg (large for larger desktops)
col-md
(medium for desktops)
col-sm
(small for tablets)
col-xs (extra small for phones)
Here are
some examples for visualizations
With equal
width
.col-xx-12
|
|||||||
.col-xx-6
|
.col-xx-6
|
||||||
.col-xx-4
|
.col-xx-4
|
.col-xx-4
|
|||||
.col-xx-3
|
.col-xx3
|
.col-xx-3
|
.col-xx-3
|
||||
.col-xx-2
|
.col-xx-2
|
.col-xx-2
|
.col-xx-2
|
.col-xx-2
|
.col-xx-2
|
||
With un-equal columns:
.col-xx-8
|
.col-xx-4
|
|
.col-xx-3
|
.col-xx-4
|
.col-xx-5
|
.col-xx-10
|
||
Columns with
offset
.col-xx-8
.col-xx-2-offset
|
||||
.col-xx-2
|
.col-xx-7
.col-xx-offset-2
|
|||
Comments
Post a Comment