I am trying to create a flex container layout whereby one of the flex items should span two rows. See image below for a better explanation:
Here is my markup:
<div class="container">
<div class="item item-1">ITEM 1</div>
<div class="item item-2">ITEM 2</div>
<div class="item item-3">ITEM 3</div>
</div>
I cannot seem to achieve this, I have tried using flex-wrap
and different combinations of the flex
property.
I was able to achieve this by putting ITEM 1
& ITEM 2
in a separate <div>
, but this presents a problem on a smaller screen, whereby ITEM 3
needs to appear BETWEEN ITEM 1
& ITEM 2
. So I would rather keep the markup as is and use the order
property to move things around as necessary.