0

Hi I am trying to make a bunch of divs of various heights float into the optimum position to take up as little space as possible collectively. I have tried using inline blocks with the vertical-align set to top as well as floating everything to the left. The divs are nestling(sort of) but leaving large gaps from time to time. Is there a way with css (or javascript if necessary) to organize these divs together like tiles without gaps? (or the smallest gaps possible)

thanks

codelove
  • 1,988
  • 5
  • 26
  • 36

2 Answers2

0

Like the images on http://iam.beyonce.com/?

If yes, check out the demos on jQuery Masonry and learn how to fix it up.

Henrik Ammer
  • 1,889
  • 13
  • 26
0

Or take a shine to Masonry's bigger sister Isotope. On top of Masonry, she's got many other tricks up her sleeve, such as sorting and filtering items and much more.

Systembolaget
  • 2,514
  • 2
  • 21
  • 37