How to place your divs in a unique grid?

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

http://imgur.com/FSiTs.jpg

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?

http://imgur.com/XsYLV.jpg

What math is behind this? Will it work float:left?

Can someone please give a good example of how this can be easily achieved?

+3
source share
1 answer

Source: https://habr.com/ru/post/1777850/


All Articles