Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zurb Foundation Margin between Columns

I have a very simple code with Foundation CSS

<div class="row">
    <div class="large-offset-1 large-6 columns">Content goes here</div>
    <div class="large-4 end columns">Side goes here</div>
</div>

I want there to be margins between the columns. Currently, there is only padding. So if I add background-color to these columns, then they stick to each other.

Doesn't Foundation provide a solution for this?

like image 748
Kousha Avatar asked Mar 04 '14 02:03

Kousha


2 Answers

try this (it makes a full width div inside the other, automatically adding margins)

<div class="large-4 medium-6 small-12 columns">
    <div class="large-24 columns">
        ... content ...
    </div>
</div>
like image 57
quemeful Avatar answered Nov 03 '22 05:11

quemeful


You could try this:

<div class="row">
  <div class="large-offset-1 large-6 columns padded-column">
    <div class="column-content">Content goes here.</div>
  </div>
  <div class="large-4 end columns padded-column">
    <div class="column-content">Side goes here</div>
  </div>
</div>

Then, for styles:

.padded-column {
  padding: 10px;
}
.column-content {
  background: red;
}
like image 1
stalepretzel Avatar answered Nov 03 '22 06:11

stalepretzel