Monday, 19 August 2013

Fixed Margin in Fluid Layout

Fixed Margin in Fluid Layout

I have the following HTML:
<div id="wrap">
<div id="col-1">column 1</div>
<div id="col-2">column 2</div>
<div id="col-3">column 3</div>
</div>
And I have the following CSS:
#wrap {
margin: 0 auto 0;
width: 90%;
}
#col-1, #col-2, #col-3 {
float: left;
width: 30%;
}
At the moment the margin between the "wrap" and the page is fluid.
And there is no spacing between each column ...
How can I make the margin between the wrap and the page fixed to 40px?
And a margin between each column also fixed to 15px?
Thank You, Miguel

No comments:

Post a Comment