Bootstrap Breakpoints

All divs are 100% wide by default. When they have a -sm, -lg etc class applied, they have smaller widths and float:left applied when the viewport width is greater than the respective min-width setting

// Extra small devices (portrait phones, less than 576px)
// No media query for `xs` since this is the default in Bootstrap

// Small (sm) devices (landscape phones, 576px and up)
@media (min-width: 576px) { float:left; width: x%; }

Columns will revert to width:100% (stack)  when device width falls below 576px


// Medium (md) devices (tablets, 768px and up)
@media (min-width: 768px) { float:left; width: x%; }

Columns will  revert to width:100% (stack)  when device width falls below 992px

// Large (lg) devices (desktops, 992px and up)
@media (min-width: 992px) { float:left; width: x%; }

Columns will  revert to width:100% (stack)  when device width falls below 1200px

// Extra large (xl) devices (large desktops, 1200px and up)
@media (min-width: 1200px) { float:left; width: x%; }

Columns will  revert to width:100% (stack)  all the time

Grid

  • Rows are wrappers for columns. Each column has horizontal padding (called a gutter) for controlling the space between them. This padding is then counteracted on the rows with negative margins. This way, all the content in your columns is visually aligned down the left side.
  • In a grid layout, content must be placed within columns and only columns may be immediate children of rows.
  <div class="row">
    <div class="col-sm-4">
      One of three columns
    </div>
    <div class="col-sm-4">
      One of three columns
    </div>
    <div class="col-sm-4">
      One of three columns
    </div>
  </div>

-sm stack at < 768

One of three columns
One of three columns
One of three columns

-md stack at < 992

One of three columns
One of three columns
One of three columns

-lg stack at < 1200

One of three columns
One of three columns
One of three columns

-xl always 100% wide so always stack

One of three columns
One of three columns
One of three columns

Combining Breakpoints to resize content containers

Default is 12 rows of 1 cell stacked, unless a revised col-* class is applied
col-xl-1 should result in 1 row of 12 cells floated left when over 1200 wide
col-lg-2 should result in 2 rows of 6 cells when over 992 wide
col-md-3 should result in 3 rows of 4 cells when over 768 wide
col-sm-4 should result in 4 rows of 3 cells when over 576 wide
col-6 should set the default of 6 rows of 2 columns
col-xl-1 col-lg-2 col-md-3 col-sm-4 col-6
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
One of 12 columns
Last updated: 11/7/2019 12:35:15 PM

Latest Updates

© 0 - 2025 - Mike Brind.
All rights reserved.
Contact me at Mike dot Brind at Outlook.com