Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,974 members, 7,825,039 topics. Date: Sunday, 12 May 2024 at 01:55 AM

Displaying Images Horizontally With Php - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Displaying Images Horizontally With Php (2805 Views)

Sorting Out A Simple Text Dictionary With PHP / Need Urgent Help With Php Mail (2) (3) (4)

(1) (Reply) (Go Down)

Displaying Images Horizontally With Php by bitejones: 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)

How To Build A Simple Search Engine Using Html Css And Javascript / '.php' And '.aspx'-lets Compare Both Scripting Langs / Help A Beginner Using Python

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.