Forum Moderators: open
it can be done with css floats, but it needs a workaround for ns4 which doesn't like dealing with floats.
this is how i did - it includes a caption for each thumbnail. you could simplify it if you only want images.
//styles
.thumbnail {float : left; height : 150px; width : 100px; padding-right : 7px; }
div.thumbnail img {border-bottom : 2px solid #999999;border-left : 0; border-right : 2px solid #999999;border-top : 0;}
.caption {clear : left; font-size : 10px; letter-spacing : 0;}
//html
<div class="thumbnail"><a href="link"><img src="image" width="" height="" alt="">
<div class="caption">caption</div></a></div>
<div class="thumbnail"><a href="link"><img src="image" width="" height="" alt="">
<div class="caption">caption</div></a></div>
<spacer type="vertical" size="120"><br clear="all" class="none">
<div class="thumbnail"><a href="link"><img src="image" width="" height="" alt="">
<div class="caption">caption</div></a></div>
<div class="thumbnail"><a href="link"><img src="image" width="" height="" alt="">
<div class="caption">caption</div></a></div>
then, the ns4 hack (needed because ns4 will continue floating the images past the edge of the container without wrapping). we put in <br> statements where you want ns4 to break the lines (calculated by where they would need to break on the minimum screen width you're dealing with), and we make sure that all other browsers ignore the <br>s:
create an extra stylesheet - netscapehack.css. link to it from your html pages using import (which ns4 fortuitously ignores for some reason):
<style type="text/css" media="screen">@import "/style/netscapehack.css";</style>
//contents of that netscapehack.css should be:
br.none { display : none;}
result = opera, ie, ns6 etc read that sheet and don't display the <br>. because ns4 doesn't read that sheet, it puts in the breaks. (the <spacer> tag is ns specific and that's just used to make sure that when the breaks appear, they go to a new line - adjust its height and the height of the divs to match your image sizes).
cheers
miles