CSS 3 · Grid

Name layout areas

Describe the page layout with named areas.

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
}
.header { grid-area: header; }

Official CSS 3 documentation

More grid commands

All grid commands · CSS 3 cheatsheet

Was this page helpful?