Layout

Gutters

Gutters are the padding between your columns, used to responsively space and align content in the grid system.

Horizontal Gutters

Horizontal gutters (.gx-*) are classes the can be used to control horizontal padding, or gutter width. For instance, in the example below, we-ve used .px-5 to add padding while in the second one, we've used .gx-5 to add gutters.

Custom padding width
Custom padding width

    <div class="container text-center">
        <div class="row px-5">
            <div class="col">
                <div class="bg p-3">
                    Custom padding width
                </div>
            </div>
            <div class="col">
                <div class="bg p-3">
                    Custom padding width
                </div>
            </div>
        </div>
    </div>

Custom gutter width
Custom gutter width

    <div class="container text-center">
        <div class="row px-5">
            <div class="col">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
        </div>
    </div>

Vertical Gutters

Vertical gutters (.gy-*) are classes the can be used to control vertical padding, or gutter width. For instance, in the example below, we-ve used .py-5 to add padding while in the second one, we've used .gy-5 to add gutters.

Custom padding width
Custom padding width
Custom padding width
Custom padding width

    <div class="container text-center">
        <div class="row py-5">
            <div class="col-6">
                <div class="bg p-3">
                    Custom padding width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom padding width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom padding width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom padding width
                </div>
            </div>
        </div>
    </div>

Custom gutter width
Custom gutter width
Custom gutter width
Custom gutter width

    <div class="container text-center">
        <div class="row gy-5">
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
        </div>
    </div>

Horizontal & Vertical

Horizontal and verticall gutters (.g-*) are classes the can be used to control both horizontal and vertical padding simultaneously.

Custom gutter width
Custom gutter width
Custom gutter width
Custom gutter width

    <div class="container text-center">
        <div class="row g-2">
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
        </div>
    </div>

Responsive gutters

The gutters also come in with responsive variations for all breakpoints. These are used to adjust the gutter width differently from one viewport size to another (or from one device type to another).

Custom gutter width
Custom gutter width
Custom gutter width
Custom gutter width

    <div class="container text-center">
        <div class="row row g-2 g-lg-3 g-xxl-4 text-center">
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
            <div class="col-6">
                <div class="bg p-3">
                    Custom gutter width
                </div>
            </div>
        </div>
    </div>

No gutters

The gutters can also be removed with .g-0. This removes the negative margins from .row and the horizontal padding from all immediate children columns.

No gutter width
No gutter width

    <div class="row g-0 text-center">
        <div class="col-6">
            <div class="bg p-3">
                Custom gutter width
            </div>
        </div>
        <div class="col-6">
            <div class="bg p-3">
                Custom gutter width
            </div>
        </div>
    </div>