thriller372 Posted February 24, 2015 Share Posted February 24, 2015 (edited) 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 Edited February 24, 2015 by thriller372 Quote Link to comment Share on other sites More sharing options...
Solution cyberRobot Posted February 24, 2015 Solution 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; } Quote Link to comment 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) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.