Currently, my DIVS are laid out as follows. This is basic float:left. Easy

But what if I want to turn some of these square divs into one that is twice as wide / long? Of course, they will be randomly selected. How can I generate HTML / javascript and do this?

What math is behind this? Will it work float:left?
Can someone please give a good example of how this can be easily achieved?
source
share