Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Deck of Cards
labelBootstrap Grid

Bootstrap Grid

12-columns, automatic responsiveness

Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works:

  • Rows must be placed within a .container (fixed-width) or .container-fluid (full-width) for proper alignment and padding.
  • Use rows to create horizontal groups of columns.
  • Content should be placed within columns, and only columns may be immediate children of rows.
  • Predefined grid classes like .row and .col-xs-4 are available for quickly making grid layouts. Less mixins can also be used for more semantic layouts.
  • Columns create gutters (gaps between column content) via padding. That padding is offset in rows for the first and last column via negative margin on .rows.
  • The negative margin is why the examples below are outdented. It's so that content within grid columns is lined up with non-grid content.
  • Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three .col-xs-4.
  • If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.
  • Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any .col-md- class to an element will not only affect its styling on medium devices but also on large devices if a .col-lg- class is not present.

Quick summary of features:

  • Simple, clean columnar layout based on percentages of the screen width for consistent, always working layouts.
  • Built-in responsiveness that adjusts automatically for different screen sizes and devices.
labelGrid Options

Grid Options

See how aspects of the Bootstrap grid system work across multiple devices with a handy table.


 Extra small devicesPhones (<768px)Small devices Tablets (≥768px)Medium devicesDesktops (≥992px)Large devices Desktops (≥1200px)
Grid behaviorHorizontal at all timesCollapsed to start, horizontal above breakpoints
Container widthNone (auto)750px970px1170px
Class prefix.col-xs-.col-sm-.col-md-.col-lg-
# of columns12
Column widthAuto~62px~81px~97px
Gutter width30px (15px on each side of a column)
Column orderingYes


The Bootstrap grid is automatically responsive. So long as the grid and its containers are used properly, your layout will become responsive whenever the .sm, .md, .lg breakpoints are hit.

Upon hitting said breakpoint, the Bootstrap grid columns stack and take the width of the container, which is usually 100%. Form fields and in some cases buttons (if specified) will also display: block; and span 100% width of the layout.

Please see the JSFiddle in the Demo section for a working example of this.




Bootstrap grid markup is simple. Simple use .col-[size]-[num-of-cols] to determine size. As noted above, [size] is either sm, md, or lg. Here's an example of a basic layout using a left-side navigation that's three columns wide, and a main content area that's 9 columns wide. Columns should always total 12.

Code Block
<div class="container">
    <div class="col-sm-3">
    <div class="col-sm-9">
            Main content area


See this JSFiddle for working examples of the Bootstrap Grid.

labelAccessibility Considerations

Accessibility Considerations

There are no special accessibility considerations for CSS layouts, so long as the markup remains semantic and error-free.

Behavior without scripting

Since the grid layout included with Bootstrap relies on CSS media-queries rather than JavaScript, so long as the browser can understand media-queries, there's no alternative behavior. If the interface is viewed on an older browser, or one that doesn't recognize media queries, the desktop view will be used.

Accessibility Resources

W3 HTML Validator
WebAim WAVE 

labelKeyboard Shortcuts

Keyboard Shortcuts


titleResearch and Discussion
labelResearch & Discussion

Research and Discussion

There 's a discussion on-going about using flexbox layouts instead of the Bootstrap grid. Since Kuali is already using Bootstrap, it makes sense to just use the included grid styles rather than to "fix what ain't broke" (so to speak). Additionally, the flexbox method doesn't add anything more - or do anything differently - than a percentage-based grid layout. UXI advises using Bootstrap grid for all layoutsis an ongoing discussion about potentially using another grid, or appending additional code such as Flexbox or Skeleton. Once that discussion is finalized this component spec will be updated.