Gutters: Spacing Between Columns

Bootstrap Framework 7 min min read Updated: Nov 16, 2026 Beginner
Gutters: Spacing Between Columns
Beginner Topic 4 of 7

What is a Gutter?

A gutter is the space between columns. By default each column has padding on the left and right, which creates a gap between neighbors, so that content does not touch.

Gutter Classes

Add these classes to the .row, not to the columns.

ClassControls
g-*Both horizontal and vertical gutters
gx-*Horizontal gutters only
gy-*Vertical gutters only

Replace the star with a number from 0 to 5. The bigger the number, the bigger the gap.

NumberGutter Size
0No gutter
10.25rem (4px)
20.5rem (8px)
31rem (16px), the default
41.5rem (24px)
53rem (48px)

Remove the Gutters

html <div class="row g-0"> <div class="col">No gap</div> <div class="col">No gap</div> </div>

This is useful when you want images or colored blocks to touch each other, like a photo gallery or a split-screen hero.

Bigger Gutters

html <div class="row g-5"> <div class="col">Wide gap</div> <div class="col">Wide gap</div> </div>

Horizontal and Vertical Separately

html <div class="row gx-5 gy-2"> <div class="col-6">A</div> <div class="col-6">B</div> <div class="col-6">C</div> <div class="col-6">D</div> </div>
Result

Large horizontal gap between A and B, and a small vertical gap between the first row and the second row.

Why Vertical Gutters Matter

When columns wrap onto a new line (on phones for example), gy-* or g-* adds space between the stacked columns. Without it, your cards would touch each other when stacked.

Responsive Gutters

html <div class="row g-2 g-md-4"> <div class="col-md-4">Card</div> <div class="col-md-4">Card</div> <div class="col-md-4">Card</div> </div>

Small gaps on phones and bigger gaps from the medium size up.

Common Mistakes

  • Adding g-3 to a column instead of the row
  • Using m-3 or p-3 on columns to create a gap, which breaks the grid. Use gutters instead
  • Forgetting that g-0 also removes the vertical gap

Conclusion

Gutters give your grid breathing room. Always apply them to the row and choose a value between 0 and 5.

Quick Summary: Use g-* on the row. g-0 removes gaps, gx-* is horizontal, gy-* is vertical.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators