g-3 class do when applied to a .row element?g-* control spacing inside rows between columns.The g-3 class sets both horizontal and vertical gutters to 1rem (16px) between columns inside a Bootstrap row. This spacing is applied as padding inside each column.
mt-*, horizontal padding uses px-*.mt-3 adds margin-top of 1rem, and px-4 adds padding-left and padding-right of 1.5rem. This matches the requirement exactly.
g-0 to the .row?<div class="row g-0"> <div class="col-6 bg-primary text-white">Left</div> <div class="col-6 bg-secondary text-white">Right</div> </div>
g-0 class removes all gutters inside the row.Adding g-0 removes all horizontal and vertical gutters between columns, so the two columns touch each other with no space.
Consistent gutters and spacing visually group related content, making it easier for users with cognitive disabilities to follow the page structure and improving overall readability.
.row with g-3?Bootstrap applies horizontal gutters as left and right padding on columns. The selector .row.g-3 > [class*='col-'] targets columns inside the row with gutters. Using a media query with min-width: 768px applies styles on medium screens and up.