I am trying to migrate from Bootstrap 3 to Bootstrap 4. Bootstrap 3 had vertical space between rows by default, but this is not the case in Bootstrap 4. Can someone please explain why? Or am I missing something in my HTML?
<div class="container-fluid">
<div class="row">
<div class="col-9">
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
Card01
</div>
<div class="card-body">
Card01
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
Card02
</div>
<div class="card-body">
Card02
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Bootstrap 5 (update 2021)
Bootstrap 5 has new gutter classes that are specifically designed to adjust the gutter for an entire row. Additionally, there is now the concept of vertical gutters to adjust the vertical spacing between rows and columns that wrap inside each row.
g-0
for no guttersg-(1-5)
to adjust horizontal & vertical gutters via spacing unitsgy-*
to adjust vertical guttersgx-*
to adjust horizontal guttersBootstrap 4 (original answer)
Rows no longer have margin-bottom
in Bootstrap 4. Use the new spacing utils (mb-4
).