Bootstrap examples

Key concepts:

Navbar

Card

flower
Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Go somewhere

Buttons

Container: auto-width

In this scenario, the column without a width defined (top right) will take up all the width left available.

col-2
col-4
col
col-2
col-6 col-md-4
col-6 col-md-4

Container: responsive, columns on top of each other in smaller screens

You can remove col-sm-12 because it will default to 100% anyway if the screen is below 1200px wide, and therefore not subject to the xl. Therefore, each div will take up 100% at the smaller width.

col-xl-6 col-sm-12
col-xl-6 col-sm-12

Container: responsive, first column on top of last two in smaller screens

At a large screen size, the first div is on the left. At a small screen size, it is on top. When the divs are squeezed into the width of phone screens, they are on top of each other.

col-lg-6 col-sm-12
col-lg-3 col-sm-6
col-lg-3 col-sm-6

Container: responsive, successive columns change size in 4 screen widths

Screen sizes: xxl >= 1400px; xl >=1200px; lg >= 992px; md >= 768px.
Sm has the default behaviour - each item takes 100% width.
In this example, the ratios are: xxl: 1:11; xl: 2:10; l: 4:8; and md: 6:6.

col-xxl-1 col-xl-2 col-lg-4 col-md-6
col-xxl-11 col-xl-10 col-lg-8 col-md-6

Sample site using bootstrap

Spacer to allow room at page bottom.