I would like to create this CSS layout: https://imgur.com/Nj1TzmN
For PC version: There is one big column (1) and second big column containing (2), (3), (4) as rows.
For mobile version: There are three rows and first row is divided to two (1), (2) and row two contains (3) and row three contains (4).
Here is my test: https://codepen.io/vanicf01/pen/KKwKWpq
HTML code here:
<div class="flexbox">
<div class="one item">1</div>
<div class="two item">2</div>
<div class="three item">3</div>
<div class="four item">4</div>
</div>
CSS code here:
.flexbox {
display: flex;
width: 300px;
}
.item:nth-of-type(1) { flex-grow: 3; }
.item:nth-of-type(2) { flex-grow: 1; }
.item:nth-of-type(3) { flex-grow: 1; }
.item:nth-of-type(4) { flex-grow: 1; }
.one {
background-color: red;
flex-grow: 3;
}
.two {
background-color: blue;
}
.three {
background-color: green;
}
.four {
background-color: yellow;
}
.item {
padding: 10px;
}
Is it possible to create this layout?