Jeck• 1,080
@j-tomajin
Posted
HELLO! it is really a good practice using grid with this kind of projects
- in mobile you can use grid-template-column: 1fr, just like in flex-direction: column; , all of your section will only keep 1 fraction of space.
- in desktop, you can also use:
.container {
display: grid;
grid-template-area:
'top-section top-section'
'middle-section bottom-section';
}
// setting grid area
.top-section {
grid-area: top-section;
}
.middle-section {
grid-area: middle-section;
}
.bottom-section {
grid-area: bottom-section;
}
- or just simply:
.container {
display: grid;
grid-template-column: repeat(2, 1fr);
}
.top-section {
grid-column: span 2;
}
- if you want to know more about Grid, here's Kevin Powell's video about it...
:D
Marked as helpful
0