This is quite easy really, if you know how grid
works.
html, body {
margin: 0;
padding: 0;
}
.has-2-columns {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
height: 100vh;
width: 100vw;
}
@media only screen and (max-width: 1000px) {
.has-2-columns {
grid-template-rows: 1fr 1fr;
grid-template-columns: none;
}
}
Top comments (0)