Bootstrap 5 Tutorial

v5.3.0

Bootstrap 5 Tutorial

Column Sizes in Bootstrap 5

Column Sizing: Control column widths using Bootstrap's 12-column grid system.

Understanding the 12-Column Grid

Bootstrap's grid system uses 12 columns as a standard. You can specify how many columns each element should span.

The 12-Column Visualization
1
2
3
4
5
6
7
8
9
10
11
12
Each block represents 1 column (8.33% width)
1
Column
= 8.33% width
6
Columns
= 50% width
8
Columns
= 66.66% width
12
Columns
= 100% width

Basic Column Sizes

Common Column Widths
Half-Width Columns
.col-6 (50%)
.col-6 (50%)
Third-Width Columns
.col-4 (33.33%)
.col-4 (33.33%)
.col-4 (33.33%)
Quarter-Width Columns
.col-3
.col-3
.col-3
.col-3
Mixed Column Sizes
.col-8 (66.66%)
.col-4 (33.33%)

All Column Size Combinations

Complete Column Size Chart
ClassColumnsWidthPercentageExample
.col-11 of 121/128.33%
1
.col-22 of 122/1216.67%
2
.col-33 of 123/1225.00%
3
.col-44 of 124/1233.33%
4
.col-55 of 125/1241.67%
5
.col-66 of 126/1250.00%
6
.col-77 of 127/1258.33%
7
.col-88 of 128/1266.67%
8
.col-99 of 129/1275.00%
9
.col-1010 of 1210/1283.33%
10
.col-1111 of 1211/1291.67%
11
.col-1212 of 1212/12100.00%
12

Responsive Column Sizes

Breakpoint-based Sizing
Example: Different Sizes on Different Screens
Responsive
Responsive
Responsive
Responsive
Screen SizeClasses AppliedResult
Extra Small (<576px)col-12Full width (1 per row)
Small (≥576px)col-sm-650% width (2 per row)
Medium (≥768px)col-md-433% width (3 per row)
Large (≥992px)col-lg-325% width (4 per row)
Complex Responsive Example
.col-12 .col-md-8
Full on mobile, 66.66% on desktop
.col-6 .col-md-4
50% on mobile, 33.33% on desktop

Column Size Combinations

Asymmetric Layouts
.col-4 (33%)
.col-8 (67%)
.col-2
.col-7
.col-3
Multiple Row Layouts
.col-9 (9 columns)
.col-3 (3 columns)
.col-3
.col-6
.col-3

Total columns in a row should not exceed 12, but you can have different combinations in different rows.

Practical Examples

Real-World Layouts
Blog Layout
Main Content Area

This takes 8 columns on medium screens and up, full width on mobile.

Sidebar

This takes 4 columns on medium screens and up, full width on mobile.

Dashboard Widgets
Widget 1

6 cols on mobile, 3 cols on desktop

Widget 2

6 cols on mobile, 3 cols on desktop

Widget 3

6 cols on mobile, 3 cols on desktop

Widget 4

6 cols on mobile, 3 cols on desktop

Product Grid
Product 1
Product 2
Product 3
Product 4
Product 5
Product 6

Column Size Best Practices

Choosing the Right Column Size
  • Content-based sizing: Size columns based on content importance
  • Responsive design: Always consider mobile-first approach
  • Readability: Text columns should be 6-8 columns wide for optimal reading
  • Visual hierarchy: Use larger columns for primary content
Common Patterns
  • 8-4 split: Main content and sidebar
  • 6-6 split: Equal halves for comparisons
  • 4-4-4: Three equal columns for features
  • 3-6-3: Balanced layout with centered content
  • 9-3: Wide content with narrow sidebar
Common Mistakes to Avoid
  • ❌ Exceeding 12 columns in a single row
  • ❌ Using too many different column sizes in one layout
  • ❌ Not testing responsive behavior
  • ❌ Forgetting to account for gutters in calculations
  • ❌ Using fixed sizes when auto layout would work better

Column Size Calculator

Column Width Calculator
123456789101112
.col-6

Width: 6/12 = 50% of container

Quick Reference
ColumnsClassWidth
Full width.col-12100%
Two thirds.col-866.66%
Half.col-650%
One third.col-433.33%
One quarter.col-325%