jw_d Posted February 4, 2009 Share Posted February 4, 2009 I have a very short and easy php script that displays photos from a database. On a separate page I have an Iframe with a width of 500. In the Iframe it shows the photos from the script referenced above (displays about 5 pictures in a row, then it reaches the end of the Iframe and starts a new row and so on...). What I want is for the images not to break into multiple rows. I'd like for the IFrame to just scroll left to right displaying all the images, versus breaking it into multiple rows. Anyone have any ideas what I can change in my code to accomplish this? I'd GREATLY appreciate any help! CODE: <? include ("admin/define.php");?> <html> <head> </head> <body> <? if(!empty($sub)) $sql="select * from `inputinfo` where sub='$sub' order by rank asc"; else $sql="select * from `inputinfo` order by rank asc"; $rez=mysql_query($sql,$dblnk); while($row=mysql_fetch_array($rez)){ $id=$row['id']; ?> <? if(!empty($row['thumb'])){?> <img src="admin/<? echo $row['thumb']?>" width="100"> <? }?> <? }?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/143840-php-script-iframed-displaying-incorrectly/ Share on other sites More sharing options...
Brian W Posted February 4, 2009 Share Posted February 4, 2009 Try removing the <body> and <html> tags. I think when <body> is defined it sets a width max according to your resolution. Link to comment https://forums.phpfreaks.com/topic/143840-php-script-iframed-displaying-incorrectly/#findComment-754825 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.