Reputation: 271614
Currently, my DIVS are laid out like this. It's basic float:left
. Easy
But what if I want to turn some of those square DIVs into one that is twice as wide/long? They will be randomly selected, of course. How would I generate the HTML/javascript and do this?
What's the math behind this? Will float:left
still work?
Can someone please give a good example of how this can be achieved easily?
Upvotes: 4
Views: 118
Reputation: 5455
jQuery Masonry works well for this: http://desandro.com/resources/jquery-masonry/ (demo)
Upvotes: 2