I have six divs A - F.
I have trouble to do css grid by responsive way to match this criteria:
All the divs should have the same width no matter what.
Between C to D I need to do space while it's grow when expand the window-screen. (push D-F to right). like in the picture above
When I shrink the container div D-F should be at the top and have same width div. like in this picture:
Here my code so far:
<div class="container">
<div class="item item--1">A</div>
<div class="item item--2">B</div>
<div class="item item--3">C</div>
<div class="item item--4">D</div>
<div class="item item--5">E</div>
<div class="item item--6">F</div>
</div>
.container {
background-color: #ddd;
display: grid;
/*grid-template-rows: repeat(2, minmax(150px, min-content));*/
grid-template-columns: repeat(3, minmax(100px, 1fr));
/* grid-auto-rows: 150px;*/
.item {
padding: 10px;
color: white;
font-family: sans-serif;
font-size: 30px;
background-color: orangered;
&--1 { background-color: orangered; }
&--2 { background-color: yellowgreen; }
&--3 { background-color: blueviolet; }
&--4 { background-color: palevioletred; }
&--5 { background-color: royalblue; }
&--6 { background-color: goldenrod; }
&--7 { background-color: crimson; }
&--8 { background-color: darkslategray; }
}
}

