To achieve a layout with 2 vertical small boxes inside a column, you can use the flex property and set flex: wrap on the parent container. I have adjusted the widths to ensure they match the dimensions of the parent element.
.flex-container {
display: flex;
width: 500px;
height: 400px;
flex-wrap: wrap;
}
.flex-container, .flex-col {
display: flex;
}
.flex-col {
flex-direction: column;
}
.large-box {
width: 300px;
height: 200px;
background: blue;
}
.small-box {
width: 200px;
height: 100px;
background: yellow;
}
.medium-box {
width: 250px;
height: 200px;
background: red;
}
<div class="flex-container">
<div class="large-box">
</div>
<div class="flex-col">
<div class="small-box">
</div>
<div class="small-box">
</div>
</div>
<div class="medium-box">
</div>
<div class="medium-box">
</div>
</div>