Possible Duplicate:
Any ideas on how I could implement a grid-view in CSS? – CSS
I have an example of a dynamic number of divs all floating left:
alt text http://img266.imageshack.us/img266/7717/qaatest1.jpg
…but would like the new row to be tucked up under the previous as in my example desired output:
alt text http://img714.imageshack.us/img714/1527/qaatest2.jpg
I know using columns might be the best way to go but am having trouble with exactly how to go about that. A CSS solution would be great.
I do know how many boxes there will be when i start out. Any thoughts?
Thanks.
This jQuery plugin might be of help:
http://desandro.com/resources/jquery-masonry/
Edit: I don’t think a pure CSS solution is sufficient. You may know the number of columns, but you won’t know the size of columns without javascript trickery. I recommend the above plugin.