Is there a way to achieve this layout without adding another div, using only parents and 3 child elements? I had tried using height: max-content
, but it didn't work as expected.
.container {
display: flex;
flex-wrap: wrap;
}
.item {
flex-basis: 54%;
background: #000;
margin: 1px;
height: max-content;
}
.item.itm1 {
flex-basis: 44%;
height: 100px;
}
<div class="container">
<div class="item itm1">1</div>
<div class="item itm2">2</div>
<div class="item itm3">3</div>
</div>