That’s why flexbox is not the best option here.
Firstly you have to set the parent to
column wrap and limit the height (which means you need to know how high each element is) so that the parent knows when to wrap…and to complicate matters, since your yellow box is 2nd and it needs to be last, you need to play with the
Oh, and I forgot, you need to set the widths too! Oh, wait…and there will be overflow to deal with also.
Finally, did I mention that this method doesn’t allow you to equalise the height of the left column to the right ones.