Bootstrap Grids

Grid Options

While Bootstrap uses ems or rems for defining most sizes,pxs are used for grid breakpoints and container widths. This is because the viewport width is in pixels and does not change with the font size.

Extra small devices (<576px) Small devices (≥576px) Medium devices (≥768px) Large devices (≥992px) Extra Large devices (≥1200px)
Max container width None (auto) 540px 720px 960px 1140px
Class prefix .col- .col-sm- .col-md- .col-lg- .col-xl-
# of columns 12
Gutter width 30px (15px on each side of a column)
Nestable Yes
Offset/(Max-Auto) Yes
Column ordering Yes
Grid-Example

Using a single set of .col-sm-*classes, you can create a basic grid system that starts out stacked on extra small devices before becoming horizontal on desktop (medium) devices.

.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-1
.col-sm-2
.col-sm-2
.col-sm-2
.col-sm-2
.col-sm-2
.col-sm-2
.col-sm-3
.col-sm-3
.col-sm-3
.col-sm-3
.col-sm-4
.col-sm-4
.col-sm-4
.col-sm-6
.col-sm-6
.col-sm-12
Max-Auto (Offset)

Move columns to the right using .offset-md-*classes. These classes increase the left margin of a column by * columns. For example, .offset-md-4moves .col-md-4over four columns. With the move to flexbox in v4, you can use margin utilities like .mr-autoto force sibling columns away from one another.

.col-sm-8 mx-auto
.col-sm-3 ml-auto
.col-sm-3 ml-auto
.col-sm-3 mr-auto
.col-sm-3 mr-auto
Nested Grid

To nest your content with the default grid, add a new .rowand set of .col-sm-*columns within an existing .col-sm-*column. Nested rows should include a set of columns that add up to 12 or fewer (it is not required that you use all 12 available columns).

.col-sm-8 mx-auto
.col-sm-6
.col-sm-6

Recent Activity

  • Mary Brown open a new companyjust now
  • Mary Brown send a new message50 min ago
  • Holly Cobb Uploaded 6 new photos.3 Week Ago
  • Mary Brown open a new company.1 Month Ago

Events

  • Jamie Miller

    Contrary to popular belief, Lorem Ipsum is not simply random text.2 Week Ago
  • Robert Jones

    Lorem Ipsum is simply dummy text of the printing and typesetting .1 Month Ago
Account Setting
  • Auto updates
  • Show offline Contacts
  • Location Permission
General Setting
  • Show me Online
  • Status visible to all
  • Notifications