sbaaaang sbaaaang - 4 months ago 38
CSS Question

Twitter Bootstrap - add top space between rows

How to add margin top to

class="row"
elements using twitter bootstrap framework?

Answer

Editing or overriding the row in Twitter bootstrap is a bad idea, because this is a core part of the page scaffolding and you will need rows without a top margin.

To solve this, instead create a new class "top-buffer" that adds the standard margin that you need.

.top-buffer { margin-top:20px; }

And then use it on the row divs where you need a top margin.

<div class="row top-buffer"> ...
Comments