I would like to create a 3x3 grid that shrinks boxes one under the other when on smaller screen. Boxes should be always the perfect square.
Also, the last two boxes (8 + 9) should be only one longer rectangle on larger screen, but take the same space as now. Is CSS grid a way to go here? Here's what I got:
body {
background: lightblue;
}
.grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
grid-gap: 20px;
}
.grid div {
width: 100%;
height: 100%;
background: white;
padding: .5em;
}
<div class="grid">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div>join</div>
<div>us</div>
</div>