Is there a way to adjust the space between rows in Bootstrap? When using the row class for every row, it's easy to set margin or padding. However, when placing all columns under one row class, setting the margin becomes tricky. Take a look at the code below.
<div class="row">
<div class="col-sm-4 col-md-3"> Div 1</div>
<div class="col-sm-4 col-md-3"> Div 2</div>
<div class="col-sm-4 col-md-3"> Div 3</div>
<div class="col-sm-4 col-md-3"> Div 4</div>
<div class="col-sm-4 col-md-3"> Div 5</div>
<div class="col-sm-4 col-md-3"> Div 6</div>
<div class="col-sm-4 col-md-3"> Div 7</div>
<div class="col-sm-4 col-md-3"> Div 8</div>
<div class="col-sm-4 col-md-3"> Div 9</div>
<div class="col-sm-4 col-md-3"> Div 10</div>
</div>
How can I add margin to each row in the above code snippet?
I can achieve this with the nested format below, but this approach lacks responsive grid support. Additionally, using the col-md-* and col-sm-* classes seems unnecessary when only utilizing the col-* class.
<div class="row">
<div class="col-sm-4 col-md-3"> Div 1</div>
<div class="col-sm-4 col-md-3"> Div 2</div>
<div class="col-sm-4 col-md-3"> Div 3</div>
<div class="col-sm-4 col-md-3"> Div 4</div>
</div>
<div class="row">
<div class="col-sm-4 col-md-3"> Div 5</div>
<div class="col-sm-4 col-md-3"> Div 6</div>
<div class="col-sm-4 col-md-3"> Div 7</div>
<div class="col-sm-4 col-md-3"> Div 8</div>
</div>
<div class="row">
<div class="col-sm-4 col-md-3"> Div 9</div>
<div class="col-sm-4 col-md-3"> Div 10</div>
</div>