Issue with margin applied to all elements

Cladiaedima

New Member
I'm having an issue, i have a wrapper div, with div inside it which contains another divs which are floated to the left and have a \[code\]margin-left: 30px;\[/code\] This is how it looks like now
wnrW9.png
However I would like to have it so there are only margins after first and second column (So first column would be at normal position)Should look like this (ignore difference in margin size, that's just a quick image)
RMXPO.png
How would I achieve that?HTML\[code\]<div clas="wrapper"> <div class="container"> <div class="box">box 1</div> <div class="box">box 2</div> <div class="box">box 3</div> <div class="box">box 4</div> <!-- etc... --> </div></div>\[/code\]CSS \[code\].wrapper { width: 1280px; margin: 0 auto;}.container { overflow: hidden;}.box { float: left; margin-left: 30px;}\[/code\]
 
Back
Top