Jump to content

[SOLVED] How to make a photo gallery?


JJohnsenDK

Recommended Posts

Hey

 

Im trying to make a photo gallery and what i cant figure out is how to get all photos on one page like this: http://sample1.myphotoalbum.com/view_album.php?set_albumName=infant

 

I can thoose not to use any css but then it looks sad. Here is the code im figthing with:

 

<?php
while($catListRow = mysql_fetch_array($searchQuery)){
echo "<div class='gallery_frame'><a href='gallery.php?action=3&no=".$catListRow['download_id']."&cat=".$catListRow['download_cat']."'><img src='".$catListRow['download_url']."' height='100' alt='".$catListRow['download_title']."' /></a></div>";
}
?>

 

This code just prints, all the images in the query i requested, out on one line intill the max width is reached then it contiues on the next line. This could work, but i cant use any CSS to make it pretty because i cant use use margin-top or bottom, because theoretically all the images are on the same line.

 

How can i fix this?

Link to comment
https://forums.phpfreaks.com/topic/49436-solved-how-to-make-a-photo-gallery/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.