Tutorialsplane

Bootstrap Add Space Between Rows


Bootstrap Add Space Between Rows Css, Add Margin – Sometimes we require custom space between rows, we can override the default behavior of row.


Bootstrap Add Space Between Rows | Margin Example

For Bootstrap version > 4 you can use the spacer class mt-n, where n can be 1 or 2. Here is simple example-

Bootstrap Add Space Between Rows Css Example:

<div class="row mt-2">

</div>

If you are using Bootstrap version < 4, You can create custom class simply as below and add margin as per your requirement.

Bootstrap Add Row Margin Example:

                           


<title>Bootstrap Grid</title>





<div class="container">
  <div class="row row-margin-05 amp-wp-inline-8d242d44713496ef132d3f1235ed49a9">
	  <h1>Row 1</h1>
  </div>
  <div class="row row-margin-05 amp-wp-inline-946849c0979ce96d9dfcc0062d8cd761">
	   <h1>Row 2</h1>
  </div>
  <div class="row row-margin-05 amp-wp-inline-9e7c0ce1766b3bbfecedd85cb626a503">
	   <h1>Row 3</h1>
  </div>
  <div class="row row-margin-05 amp-wp-inline-946849c0979ce96d9dfcc0062d8cd761">
	   <h1>Row 4</h1>
  </div>
</div>

                    

Try it »

If you run the above example it will produce output something like this-