I have 3 different elements in my row class with bootstrap. I wish to create a margin (of 20px for example) between EACH of the elements in the row container. Since the elements are divided into 4 equal spaces of the row container (on the same line), adding a margin class with a margin parameter of 20px pushes the other elements to the next line (whereas I want to keep them all in the same line).
My current code
<div class="row">
<a style="display:block" href="#">
<div class="col-sm-4 margin">
<span class="glyphicon glyphicon-envelope"></span>
<h4>About Us</h4>
</div>
</a>
<a style="display:block" href="#">
<div class="col-sm-4 margin">
<span class="glyphicon glyphicon-envelope"></span>
<h4>Contacts</h4>
</div>
</a>
<a style="display:block" href="#">
<div class="col-sm-4 margin">
<span class="glyphicon glyphicon-envelope"></span>
<h4>Upcoming Events</h4>
</div>
</a>
</div>
paddingto.col-sm-4, and set .col-sm-4 tobox-sizing: border-box;. See this example: jsfiddle.net/pe0w20kd Is this what you want?