Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Foundation 4 - Margin/gutter between rows

I have a really simple question: how to I get a margin between rows in Foundation 4?

The following mark-up yields 3 spaced link images per row, but no gap between the rows. Maybe a 3 x 3 grid shouldn't be done like this. Otherwise, can Foundation do a square grid w/o additional CSS?

<div class="row">
  <a class="large-4 columns"><img /></a>
  <a class="large-4 columns"><img /></a>
  <a class="large-4 columns"><img /></a>
</div>
<div class="row">
  <a class="large-4 columns"><img /></a>
  <a class="large-4 columns"><img /></a>
  <a class="large-4 columns"><img /></a>
</div>
<div class="row">
  <a class="large-4 columns"><img /></a>
  <a class="large-4 columns"><img /></a>
  <a class="large-4 columns"><img /></a>
</div>

In the interests of time, I've implemented this as 9 left-floated elements, but I'm still curious about row spacing in Foundation.

Ta, Luke

like image 861
Luke Puplett Avatar asked Feb 02 '26 05:02

Luke Puplett


1 Answers

You can override the default margin on the .row in CSS with margin-bottom: 10px;

Alternatively, a good way to implement a 3x3 grid of images in Foundation would be to use a 3-up block grid.

  • Foundation 5 block grid
  • Foundation 6 block grids
like image 75
Eric Morris Avatar answered Feb 05 '26 08:02

Eric Morris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!