₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,689 members, 8,423,201 topics. Date: Tuesday, 09 June 2026 at 12:43 PM

Toggle theme

Displaying Images Horizontally With Php - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingDisplaying Images Horizontally With Php (2930 Views)

1 Reply (Go Down)

Displaying Images Horizontally With Php by bitejones(op): 9:43pm On Sep 24, 2011
Hi, sincerely hope i can get some help here. im pulling some images from my database but i want to display them horizontally for example 3 or 4 images in a row then it moves to a new row. so far i have only being able to display the images vertically. I am not sure if i should be using css or there is a way to do it with php. would appreciate any assistance. I have been tryin to get this done for sometime now and i need to complete this project.
Re: Displaying Images Horizontally With Php by bakenda(m): 9:40am On Sep 26, 2011
Don't have the time to give you some code now,
but an idea is to echo the images in table cells of
3 or 4 columns in a loop i.e you write a loop that
will echo the images in a table of 3 or 4 columns,
depending on how many images you want per row.
Re: Displaying Images Horizontally With Php by farouqzaib: 4:47pm On Sep 26, 2011
@bakenda, nice idea! But tables need not be used.

@OP,
U'll need to use CSS. O'course I won't tell ya. Gotta google it urself.
OK! a lil spoiler. U'll have to use lists(ul or ol).
Re: Displaying Images Horizontally With Php by Fayimora(m): 5:43pm On Sep 26, 2011
Just do it with CSS. After displaying ur images with lists, you need to make each element of the list horizontal to the other.

You should have a look at the way horizontal navigation menus are displayed. That's exactly what you need. Try and if you don't get it then come back for help. Also, it wud be nice if you post your code dat doesn't work
Re: Displaying Images Horizontally With Php by Beaf: 4:00am On Sep 27, 2011
^
Lists will work, but if the images in a row are not related it might be best to simply use floated divs.

@OP, as others have pointed out, your problem has little to do with PHP, but all to do with HTML and CSS.
Re: Displaying Images Horizontally With Php by stjoe1(m): 4:10am On Oct 07, 2011
Try Using the table tag in HTML, and arrange them in rows.
1 Reply

Sorting Out A Simple Text Dictionary With PHPNeed Urgent Help With Php Mail234

Top 15 Websites To Learn Programming/coding - Best Sources To Learn Quickly.!My Funny Experience With Whogohost Now Go54Help A Beginner Using Python