every second item needs to be on right side of the page, but inline with first item, so it would create 2x2 type grid of both echoed items.
I added some CSS like this .container{float:left; width:50%;} but it didn't work.
if ($file6 % 2 == 1)
{
echo '<div id="container">
<div id="thumbnail">
<a href="/images/tirgus/'. $file .'" title="'.cleanString($file).'" class="thickbox"><img src="/images/tirgus/thumbs/'.$row['id'].'.jpeg" width="141" height="74" alt="image" /></a>
</div>
<br>
<div id="info1"><sub>' .cleanString($file2).'</sub></div>
<br>
<div id="info2"><sub>Telefons: ' .cleanString($file3). '</sub><br><sub>email: '.cleanString($file4).'</sub></div><br>
<div id="info3"><sub>Iepostoja:</sub> ' .cleanString($file5). '</div><br>
</div><widgets><customization><css> <link rel="stylesheet" href="template_faili/gallery.css"></css></customization></widgets>';
}
else if ($file6 % 2 == 0) {
echo '<div id="container2">
<div id="thumbnail2">
<a href="/images/tirgus/'. $file .'" title="'.cleanString($file).'" class="thickbox"><img src="/images/tirgus/thumbs/'.$row['id'].'.jpeg" width="141" height="74" alt="image" /></a>
</div>
<br>
<div id="info1"><sub>' .cleanString($file2).'</sub></div>
<br>
<div id="info2"><sub>Telefons: ' .cleanString($file3). '</sub><br><sub>email: '.cleanString($file4).'</sub></div><br>
<div id="info3"><sub>Iepostoja:</sub> ' .cleanString($file5). '</div><br>
</div><widgets><customization><css> <link rel="stylesheet" href="template_faili/gallery.css"></css></customization></widgets>';
}
}