Bootstrap 5 Grid Column
A Bootstrap 5 Grid Column (col) is a horizontal division within a .row container that uses a 12-column flexbox system to control content width and layout across breakpoints. Use it whenever you need to place content side by side, build responsive multi-column layouts, or control exactly how wide a section appears at different screen sizes.
Primary Class
.grid-columnCommon Use Cases
- →Building a three-column pricing table where each plan occupies col-md-4, collapsing to full-width on mobile
- →Creating a two-column blog layout with a col-lg-8 article body and a col-lg-4 sidebar for related posts and ads
- →Laying out a product grid on an e-commerce page using col-6 col-md-4 col-lg-3 so cards reflow from 2 to 3 to 4 per row as screen width increases
- →Splitting a contact page into a col-md-6 enquiry form and a col-md-6 map embed that stack vertically on phones
Variants & Classes
| Variant | Description |
|---|---|
| Grid Column Default | Standard grid column with Bootstrap's default styling. |
| Grid Column Responsive | Responsive variant that adapts to different screen sizes. |
Code Example
<div class="container">
<div class="row g-4">
<div class="col-12 col-md-4">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">Starter Plan</h5>
<p class="card-text">Perfect for freelancers and solo founders launching their first product.</p>
<a href="#" class="btn btn-outline-primary">Get Started</a>
</div>
</div>
</div>
<div class="col-12 col-md-4">
<div class="card h-100 border-primary">
<div class="card-body">
<h5 class="card-title">Pro Plan</h5>
<p class="card-text">Designed for growing teams that need collaboration tools and priority support.</p>
<a href="#" class="btn btn-primary">Upgrade Now</a>
</div>
</div>
</div>
<div class="col-12 col-md-4">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">Enterprise Plan</h5>
<p class="card-text">Custom contracts, SSO, and a dedicated account manager for large organisations.</p>
<a href="#" class="btn btn-outline-secondary">Contact Sales</a>
</div>
</div>
</div>
</div>
</div>Live Examples
Basic Grid Column
Canvas Framework Variants
The Canvas template extends Bootstrap 5 with 1,658+ component variants. Generate any of these using Canvas Builder:
- ✓Canvas Builder generated grid column with custom colours
- ✓Grid Column with interactive states
- ✓Responsive grid column for all screen sizes
Best Practices
Use g-* gutter classes instead of manual padding
Bootstrap 5 replaced the old .no-gutters approach with gutter utilities like g-3 or gx-4 / gy-2 on the .row element — this gives you independent horizontal and vertical gap control without writing custom CSS.
Combine auto-width and fixed-width columns in the same row
Place a fixed col-md-3 sidebar next to a col-md auto column and Bootstrap will automatically expand the auto column to fill the remaining space — ideal for dashboard layouts without hardcoding every width.
Use offset classes for centring single columns
Instead of wrapping a narrow column in a justify-content-center row, apply offset-md-3 to a col-md-6 to push it to the visual centre — useful for narrow forms or single-column article bodies.
Order columns visually without changing HTML source
Use order-md-1 and order-md-2 on columns to reverse their visual display at a specific breakpoint — common when you want an image to appear above text on mobile but beside it on desktop.