<style>* {padding: 0;margin: 0;box-sizing: border-box;}.container {font-size: 1.5rem;display: grid;background-color: beige;padding: 5px;grid-template-areas: "header header header" "content content sidebar" "footer footer footer";grid-template-rows: 10vh 40vh 10vh;grid-gap: 10px;width: 100%;margin: auto;text-align:center;}.navbar {grid-area: header;background-color: brown;}.mainarea {grid-area: content;background-color: cadetblue;}.sidebar {grid-area: sidebar;background-color: chocolate;}.footer {grid-area: footer;background-color: crimson;}</style><div class="container"><div class="navbar">Header</div><div class="mainarea">Content</div><div class="sidebar">Sidebar</div><div class="footer">Footer</div></div>
CSS Grids
grid-column-gapgrid-row-gapgrid-gap

Grid Container
.grid-container {display: grid;grid-template-columns: auto auto 200px 30% 1fr 2fr; //units :fr,px,em,vh}
.grid-container {display: grid;grid-template-rows: 80px 200px;}
.grid-container {display: grid;justify-content: space-evenly; //values:space-around,space-between,start,end,center}
.grid-container {display: grid;height: 400px;align-content: center; //values:space-around,space-between,start,end,center}
Grid Items
.item1 {grid-column: 1 / 5;grid-column: 1 / span 3; //Make "item1" start on column 1 and span 3 columns}
The grid-row property defines on which row to place an item.
You define where the item will start, and where the item will end.
.item1 {grid-row: 1 / 4; //Make "item1" start on row-line 1 and end on row-line 4grid-row: 1 / span 2; //Make "item1" start on row 1 and span 2 rows}
.item8 {grid-area: 1 / 2 / 5 / 6; //Make "item8" start on row-line 1 and column-line 2, and end on row-line 5 and column line 6
grid-area: 2 / 1 / span 2 / span 3; //Make "item8" start on row-line 2 and column- -line 1, and span 2 rows and 3 columns}
.item1 {grid-area: myArea;}.grid-container {grid-template-areas: 'myArea myArea myArea myArea myArea';}
.item1 {grid-area: myArea;}.grid-container {grid-template-areas: 'myArea myArea . . .';}
.item1 { grid-area: header; }.item2 { grid-area: menu; }.item3 { grid-area: main; }.item4 { grid-area: right; }.item5 { grid-area: footer; }.grid-container {grid-template-areas:'header header header header header header''menu main main main right right''menu footer footer footer footer footer';}
grid-template-areasgrid-template-columnsgrid-template-rows
grid-template: "header header header" 20%"content content content" auto"sidebar sidebar" 100px 1fr / 50px 1fr; //'item area name' column / row