How to add margin top to class="row"
elements using twitter bootstrap framework?
20 s
Bootstrap 3
If you need to separate rows in bootstrap, you can simply use .form-group
. This adds 15px margin to the bottom of row.
In your case, to get margin top, you can add this class to previous .row
element
<div class="row form-group">
/* From bootstrap.css */
.form-group {
margin-bottom: 15px;
}
Bootstrap 4
You can use built-in spacing classes
<div class="row mt-3"></div>
The “t” in class name makes it apply only to “top” side, there are similar classes for bottom, left, right. The number defines space size.