Images not in rows - could use some help

I hired a local freelancer to help out with some work and its not quite what I want. The project has dragged on and I want to finish it.
Basically, the page is thumbnail images generated from a database.

I want the thumbnail images in rows, preferably to stretch to 100% page width or if that is not possible then 4 or 5 images to a row, however right now each thumbnail is in its own row.
I don’t know php however I’ve been cleaning up other issues on these pages, but I don’t want to mess up the code.

The page is here - Todd White Fine Art Holywood Glamour Art

The code for the thumbnails is here.

$resource = mysql_query(“select * from art WHERE artist = ‘Todd White’”);

while ($row = mysql_fetch_array($resource)) {
echo “<div id=‘gallery’>”;
echo “<a href='view.php?image=” . $row[“image”] . “'>”;
echo “<img border=0 src='…/folderimages/” . $row[“thumb”] . “’ /><br />”;
echo $row[“title”] . “</a></div>”;


Is there any way to fix this? Thank you.

Thanks but neither of your suggestions worked.

It initially looks like a styling issue.


echo "<div id='gallery'>";


echo "<div class='gallery'>";

Then add this to your CSS: { display: inline; }

That should do it, I think! :slight_smile:


You could “float” them left too, but then you’d have to add something to clear the float.

Here’s a different solution, but this certainly belongs in the CSS forum. :slight_smile:

CSS Image Gallery

Check out the source to see what’s going on, but be warned, I don’t do CSS.