remove div margin at end of row (and clear floats)

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 20, 2012   (RSS)

By zaba - June 19, 2012

Basically i want to return the results into rows and columns but at the end of each row I need to remove the class that adds the margin to the right hand side and add in a clear floats div, for example.. (3 columns, 3 rows 9 returned results).
This is not a css thing, I just need to know how I would accomplish this from a list of returned records, so basically when parsed the source code would look like this...

<div id="container">
<div class="box margin10">some stuff</div>
<div class="box margin10">some stuff</div>
<div class="box">some stuff</div>
<div class="clearfloats"></div>

<div class="box margin10">some stuff</div>
<div class="box margin10">some stuff</div>
<div class="box">some stuff</div>
<div class="clearfloats"></div>

<div class="box margin10">some stuff</div>
<div class="box margin10">some stuff</div>
<div class="box">some stuff</div>
<div class="clearfloats"></div>

</div>

Re: [Jason] remove div margin at end of row (and clear floats)

By zaba - June 20, 2012

Thanks Jason,
spot on!!