I want to display some div’s in a wrap. The div have same class name and have fixed width. I want to set some margin-right to the first divs in the row, but not to the last div in the row, but the problem is that I can’t change the html.
if its not possible with the CSS, can it be done with jQuery?
Edit: Sorry, forgot to mention, there are always 2 divs in a row.
<div class="list">
<div class="box">Box 1</div>
<div class="box">Box 2</div> <!-- should be margin-right:0 -->
<div class="box">Box 3</div>
<div class="box">Box 4</div> <!-- should be margin-right:0 -->
</div>
now used to this
first option
second option
more info http://www.w3.org/Style/Examples/007/evenodd.en.html