Visual Design
This is the most human-readable way to create layouts. You literally draw the site structure with words.
Steps:
- Assign names to elements via
grid-area. - Describe the scheme in parent via
grid-template-areas.
.nav { grid-area: menu; }
.header { grid-area: head; }
.main { grid-area: body; }
.container {
display: grid;
grid-template-areas:
"head head head"
"menu body body"
"menu body body";
}
Tip
To leave an empty cell, use a dot (.). This makes the layout very visual — you immediately see " holes " in the design.