I'm currently delving into flexbox and aiming to create a layout similar to the one shown below:
https://i.sstatic.net/epnkU.png
Here is the code I have come up with:
.container {
display: flex;
gap: 26px;
}
.flex50 {
flex: 50%;
flex-wrap: wrap;
min-width: calc(50% - 13px);
background-color: #000000;
margin-bottom: 26px;
}
.flex33 {
flex: 33.33333%;
flex-wrap: wrap;
min-width: 33.33333%;
background-color: #000000;
margin-bottom: 26px;
}
<div class="container">
<div class="flex50">
1 50
</div>
<div class="flex50">
2 50
</div>
<div class="flex33">
1 33
</div>
<div class="flex33">
2 33
</div>
<div class="flex33">
3 33
</div>
<div class="flex33">
4 33
</div>
</div>
However, it seems that the line breaks are not functioning as expected. Can anyone point out where I might be going wrong?