## Grid

Use our powerful mobile-first flexbox grid to build layouts of all shapes and sizes thanks to a twelve column system, six default responsive tiers, Sass variables and mixins, and dozens of predefined classes.

Grid on Bootstrap

#### Grid options

While Bootstrap uses `.col-`, `.col-sm-`, `.col-md-`, `.col-lg-` and `.col-xl-`, we introduced a new breakpoint, `.col-xxl-` for the massive screen size.

    <div class="table-responsive scrollbar">
      <table class="table table-bordered table-striped mb-0">
        <thead>
          <tr>
            <th></th>
            <th class="text-center">Extra small<br /><small>&lt;576px</small></th>
            <th class="text-center">Small<br /><small>≥576px</small></th>
            <th class="text-center">Medium<br /><small>≥768px</small></th>
            <th class="text-center">Large<br /><small>≥992px</small></th>
            <th class="text-center">Extra large<br /><small>≥1200px</small></th>
            <th class="text-center">Massive<br /><small>≥1400px</small></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th class="text-nowrap" scope="row">Max container width</th>
            <td>None (auto)</td>
            <td>540px</td>
            <td>720px</td>
            <td>960px</td>
            <td>1140px</td>
            <td>1320px</td>
          </tr>
          <tr>
            <th class="text-nowrap" scope="row">Class prefix</th>
            <td><code>.col-</code></td>
            <td><code>.col-sm-</code></td>
            <td><code>.col-md-</code></td>
            <td><code>.col-lg-</code></td>
            <td><code>.col-xl-</code></td>
            <td><code>.col-xxl-</code></td>
          </tr>
          <tr>
            <th class="text-nowrap" scope="row"># of columns</th>
            <td colspan="6">12</td>
          </tr>
          <tr>
            <th class="text-nowrap" scope="row">Gutter width</th>
            <td colspan="6">30px (15px on each side of a column)</td>
          </tr>
          <tr>
            <th class="text-nowrap" scope="row">Nestable</th>
            <td colspan="6">Yes</td>
          </tr>
          <tr>
            <th class="text-nowrap" scope="row">Column ordering</th>
            <td colspan="6">Yes</td>
          </tr>
        </tbody>
      </table>
    </div>

| Extra small <576px | Small ≥576px | Medium ≥768px | Large ≥992px | Extra large ≥1200px | Massive ≥1400px
--- | --- | --- | --- | --- | --- | ---
Max container width | None (auto) | 540px | 720px | 960px | 1140px | 1320px
Class prefix | `.col-` | `.col-sm-` | `.col-md-` | `.col-lg-` | `.col-xl-` | `.col-xxl-`
# of columns | 12
Gutter width | 30px (15px on each side of a column)
Nestable | Yes
Column ordering | Yes

#### Equal-width

For example, here are two grid layouts that apply to every device and viewport, from xs to xxl. Add any number of unit-less classes for each breakpoint you need and every column will be the same width.

    <div class="container text-center">
      <div class="row bg-body-highlight mb-3">
        <div class="col p-2 border">1 of 2</div>
        <div class="col p-2 border">2 of 2</div>
      </div>
      <div class="row bg-body-highlight">
        <div class="col p-2 border">1 of 3</div>
        <div class="col p-2 border">2 of 3</div>
        <div class="col p-2 border">3 of 3</div>
      </div>
    </div>

1 of 2
2 of 2
1 of 3
2 of 3
3 of 3

#### Column width

Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it. You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column.

    <div class="container text-center">
      <div class="row bg-body-highlight mb-3">
        <div class="col p-2 border">1 of 3</div>
        <div class="col-6 p-2 border">2 of 3 (wider)</div>
        <div class="col p-2 border">3 of 3</div>
      </div>
      <div class="row bg-body-highlight">
        <div class="col p-2 border">1 of 3</div>
        <div class="col-5 p-2 border">2 of 3 (wider)</div>
        <div class="col p-2 border">3 of 3</div>
      </div>
    </div>

1 of 3
2 of 3 (wider)
3 of 3
1 of 3
2 of 3 (wider)
3 of 3

#### Stacked to horizontal

Using a single set of `.col-sm-*` classes, you can create a basic grid system that starts out stacked and becomes horizontal at the small breakpoint (`sm`).

    <div class="container text-center">
      <div class="row bg-body-highlight mb-3">
        <div class="col-sm-8 p-2 border">col-sm-8</div>
        <div class="col-sm-4 p-2 border">col-sm-4</div>
      </div>
      <div class="row bg-body-highlight">
        <div class="col-sm p-2 border">col-sm</div>
        <div class="col-sm p-2 border">col-sm</div>
        <div class="col-sm p-2 border">col-sm</div>
      </div>
    </div>

col-sm-8
col-sm-4
col-sm
col-sm
col-sm

#### Mix and match

Don’t want your columns to simply stack in some grid tiers? Use a combination of different classes for each tier as needed. See the example below for a better idea of how it all works.

    <div class="container text-center">
      <div class="row mb-3">
        <div class="col-md-8 bg-body-highlight p-2 border">.col-md-8</div>
        <div class="col-6 col-md-4 bg-body-highlight p-2 border">.col-6 .col-md-4</div>
      </div>
      <div class="row mb-3">
        <div class="col-6 col-md-4 bg-body-highlight p-2 border">.col-6 .col-md-4</div>
        <div class="col-6 col-md-4 bg-body-highlight p-2 border">.col-6 .col-md-4</div>
        <div class="col-6 col-md-4 bg-body-highlight p-2 border">.col-6 .col-md-4</div>
      </div>
      <div class="row">
        <div class="col-6 bg-body-highlight p-2 border">.col-6</div>
        <div class="col-6 bg-body-highlight p-2 border">.col-6</div>
      </div>
    </div>

.col-md-8
.col-6 .col-md-4
.col-6 .col-md-4
.col-6 .col-md-4
.col-6 .col-md-4
.col-6
.col-6

#### Row columns

Use the responsive `.row-cols-*` classes to quickly set the number of columns that best render your content and layout. Whereas normal `.col-*` classes apply to the individual columns (e.g., `.col-md-4`), the row columns classes are set on the parent .row as a shortcut. With `.row-cols-auto` you can give the columns their natural width.
Use these row columns classes to quickly create basic grid layouts or to control your card layouts.

    <div class="container text-center">
      <div class="row row-cols-2 bg-body-highlight">
        <div class="col p-2 border">Column</div>
        <div class="col p-2 border">Column</div>
        <div class="col p-2 border">Column</div>
        <div class="col p-2 border">Column</div>
      </div>
    </div>

Column
Column
Column
Column

#### Nesting

To nest your content with the default grid, add a new `.row` and 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).

    <div class="container text-center">
      <div class="row">
        <div class="col-sm-3 bg-body-highlight p-2 border">Level 1: .col-sm-3</div>
        <div class="col-sm-9 bg-body-highlight p-3 border">
          <div class="row">
            <div class="col-8 col-sm-6 p-2 border">Level 2: .col-8 .col-sm-6</div>
            <div class="col-4 col-sm-6 p-2 border">Level 2: .col-4 .col-sm-6</div>
          </div>
        </div>
      </div>
    </div>

Level 1: .col-sm-3
Level 2: .col-8 .col-sm-6
Level 2: .col-4 .col-sm-6

##### On this page

##### Demo widget

I need help with something

I can’t reorder a product I previously ordered

How do I place an order?

My payment method not working

##### Eric

Ask us anything – we’ll get back to you here or by email within 24 hours.

##### Theme Customizer

Explore different styles according to your preferences

##### Color Scheme

Light
Dark
Auto

##### RTL

Change text direction

##### Support Chat

Toggle support chat

##### Navigation Type

Vertical
Horizontal
Combo
Dual nav

##### Vertical Navbar Appearance

Default Default
Darker Lighter

##### Horizontal Navbar Shape

Default
Slim

##### Horizontal Navbar Appearance

Default
Darker Lighter
Purchase template
customize