I'm using twitter-bootstrap, with LESS and Rails.
I want to add a simple spacer to my CSS that appears between the grid rows to space things out a bit better. I couldn't find anything in the bootstrap that does it for me so I figured I could just add a spacer div with a margin-top defined.
I took the following code in my bootstrap override file:
.spacer { margin-top: 40px; }
but all the margins seem to bunch together at the top of the page and not between the grid. I'm sure its a position attribute I'm missing somewhere please help.
I'm open to any other suggestions on a better way to achieve this, or if t-bootstrap has anything already that I have missed.
Thanks!
This question is related to
css
ruby-on-rails-3
twitter-bootstrap
My approach. Tricky, but works well for me
<p> </p>
In Bootstrap 4 you can use classes like mt-5
, mb-5
, my-5
, mx-5
(y for both top and bottom, x for both left and right).
According to their site:
The classes are named using the format {property}{sides}-{size} for xs and {property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.
Source: Stackoverflow.com