Hello,
On my site I display garden thumbnails by the year and month. I use an echo to put each thumbnail and brief text inside a <div> and then loop thru all the found thumbs.
With my monitor and settings there are three thumbs per row when I am full sized and I can shrink window to make it two or enlarge for 4. But let's say 3 wide. So any given month calls the same script, only the quantity of pix varies.
On some months after 6 pix, the seventh is all the way to the right, with two empty spaces to it's left. On others same thing, only after 9 pix, the 10th is strange, or after 3, the fourth, etc.
So what the heck is going on?
The relevant code is
echo '<div class ="float">';
echo "<a class = \"plain\" href=picture.php?imageid=$imageid&picpath=$picpath><img src=\"$thumburl\" ><p>$thumbcaption</p></a>";
echo '</div>';
where float and plain are in a stylesheet. Float is
div.float {
float: left;
width: 300px;
padding: 10px;
and plain just turns off text-decoration so the link is not colored.
For my first year and a half I wrote a separate .html page for each month and they use the exact same <div> container and work fine. In Jun 2003 I switched to the php version.
I have banged my head against the wall for hours on this and any comment will be appreciated.
The site is: http://gardens.sallyanddavid.com/php/month.php?year=2003&month=jun if you want to see the problem "in production" (egads!!!).
Thanks
David