ACwarrior Posted January 5, 2009 Share Posted January 5, 2009 I need to display my images horizontally on my webpage... My script as below.. <?php require("functions.inc.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>My Love Photo</title> </head> <body> <?php displayPhoto("photo", "200"); ?> </body> </html> But.... The Image appear: Image1 Image2 Image3 Image4 . . . . . Image200 I need the image to appear like this: Image1 Image2 Image3 Image4 Image5 Image6 Image7 Image8 Image9 Image10 Image11 Image12 Please kindly advise!! I m a Noob! Link to comment https://forums.phpfreaks.com/topic/139557-help-on-displaying-my-image-horizontally-and-wrap-on-my-webpage/ Share on other sites More sharing options...
Zhadus Posted January 5, 2009 Share Posted January 5, 2009 That code doesn't show us anything to help you out. You are calling displayPhoto(). Show us the code for that. Link to comment https://forums.phpfreaks.com/topic/139557-help-on-displaying-my-image-horizontally-and-wrap-on-my-webpage/#findComment-730028 Share on other sites More sharing options...
ACwarrior Posted January 5, 2009 Author Share Posted January 5, 2009 I am Calling DisplayPhoto("photo","200') "photo" is the image and caption "200" is the limit i am showing on the webpage. What code do you require? Link to comment https://forums.phpfreaks.com/topic/139557-help-on-displaying-my-image-horizontally-and-wrap-on-my-webpage/#findComment-730029 Share on other sites More sharing options...
sniperscope Posted January 5, 2009 Share Posted January 5, 2009 check here. i just send a post. it may help you. http://www.phpfreaks.com/forums/index.php/topic,232605.0.html Link to comment https://forums.phpfreaks.com/topic/139557-help-on-displaying-my-image-horizontally-and-wrap-on-my-webpage/#findComment-730030 Share on other sites More sharing options...
ACwarrior Posted January 5, 2009 Author Share Posted January 5, 2009 I seen that link and i try to work with it and end up more errors... Can anyone help with what i have? Link to comment https://forums.phpfreaks.com/topic/139557-help-on-displaying-my-image-horizontally-and-wrap-on-my-webpage/#findComment-730035 Share on other sites More sharing options...
sniperscope Posted January 5, 2009 Share Posted January 5, 2009 I seen that link and i try to work with it and end up more errors... Can anyone help with what i have? Ok !!! in that link we output only 3 images in a row. Let's assume you want 6 pictures in a row. then all you need to do is change if($i > 3){ echo "<tr>"; } .. .. .. if($i >2){ echo "</tr>"; } into if($i > 6){ // you can limit it whit how many picture you want to output in a row. if you want 10 pics then type 10 echo "<tr>"; } .. .. .. if($i >5){ // make sure you initialize less then above if statement. if you want 10 pics then type 9 echo "</tr>"; } hope this help Link to comment https://forums.phpfreaks.com/topic/139557-help-on-displaying-my-image-horizontally-and-wrap-on-my-webpage/#findComment-730048 Share on other sites More sharing options...
T-Bird Posted January 5, 2009 Share Posted January 5, 2009 Add a css style img { display: inline; } Now the images wont force a new line before/after they'll line up next to each other. When the edge of the page is reached they should automatically jump down a level. This is more an HTML question than a PHP though isn't it? Link to comment https://forums.phpfreaks.com/topic/139557-help-on-displaying-my-image-horizontally-and-wrap-on-my-webpage/#findComment-730131 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.