thriller372 Posted February 24, 2015 Share Posted February 24, 2015 I have created a container & it displays the contents of a folder (images) as thumbnails but the thumbnails display outside the container. So is there anyway I can keep the thumbnails inside the container. I can display seven thumbnails inside the container but then I need to start a new line to keep within the container. Appreciate any help <!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8" /> <title>Basic Demo</title> </head> <body> <!-- start container !--> <div style="position:absolute;left:27%;top:19%;width:640px;height:543px;border:1px solid #A1BADA;border-radius: 15px;background: #DFDFDF;z-index:-1;"></div> <!-- end container !--><style>div.numstyle {position: absolute; top:25%; left:28%;font-size:40px;clear:both;}img { display: inline-block; margin: 15px 15px 15px 15px; max-width: 60px; height: auto; outline: outset; }img:active { max-width: 15%;}</style> <div class="numstyle"> <?php$folder = 'images/';$filetype = '*.*';$files = glob($folder.$filetype);$count = count($files);for ($i = 0; $i < $count; $i++) { echo '<tr><td>'; echo '<a name="'.$i.'" href="#'.$i.'"><img src="'.$files[$i].'" /></a>'; echo '</td></tr>';}?> </div> </body> </html>I'm not worried that it's not pretty I just need to know if there's a way of solving this problem. Thanks Link to comment https://forums.phpfreaks.com/topic/294862-keep-thumnails-insdie-container/ Share on other sites More sharing options...
cyberRobot Posted February 24, 2015 Share Posted February 24, 2015 Try adding a width to the "numstyle" div. div.numstyle { position: absolute; top:25%; left:28%;font-size:40px;clear:both; width:640px; } Link to comment https://forums.phpfreaks.com/topic/294862-keep-thumnails-insdie-container/#findComment-1506597 Share on other sites More sharing options...
thriller372 Posted February 24, 2015 Author Share Posted February 24, 2015 Thanks for the quick reply and FIX !!! I can't believe it was that easy, I guess knowledge is power. Cheers much appreciated (I did try and like this but have reached quota but I will sort that out) Link to comment https://forums.phpfreaks.com/topic/294862-keep-thumnails-insdie-container/#findComment-1506598 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.