I'm looking for some help with preparing layout pattern in flexbox, the thing is that I will have a set of divs printed inside container and I can not change the rendering logic (i.e. add some wrapping rows), yet, I'd like to get something like this:
Unfortunately got stuck every time, results weren't satisfactory at all :/ Height of those divs is fixed, 1 is a sum of 2 + 3 + gap.
https://jsfiddle.net/zechkgf4/
[]
Thank you in advance
What you want to do is not posible with flex-box as is pointed in link provided by @Michael_B
You can generate something really close to what you want using floats:
Note that the big block aligned to right is changed to be 6n+4 instead of 6n+6
To the contrary, this layout is possible using flexbox, with a slight modification to your markup. Here's a working example: http://codepen.io/timothylong/pen/XRrBBW
The HTML:
The SCSS:
The
.small
wrapper allows us to stack the two smaller modules vertically usingflex-direction: column
.