Grid Placement

๐ŸŽจ CSS3+ ๐ŸŸข Chapter 25 of 49 ๐Ÿ“‚ Phase 09: CSS Grid ๐Ÿ“… 2026 Edition
๐Ÿ“Œ Covered in this chapter: grid-column ยท grid-row ยท Grid Lines ยท grid-area ยท Named Areas ยท Spanning ยท place-items ยท place-content ยท justify-items ยท align-items ยท Auto Placement
Welcome to Chapter 25: Grid Placement โ€” part of the CSS Complete Roadmap. This lesson covers all subtopics with clear explanations, code examples, and best practices used in professional web development.
1Named Grid Areas โ€” Page Layout
CSS โ€” App Layoutโ–ถ Try in Editor
.layout {
  display: grid;
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  gap: 0;
}

.header { grid-area: header; }
.sidebar { grid-area: sidebar; }
.main { grid-area: main; }
.footer { grid-area: footer; }
2grid-column, grid-row & Spanning
CSS
.hero {
  grid-column: 1 / -1;       /* span all columns */
}

.featured {
  grid-column: span 2;
  grid-row: span 2;
}

/* Line numbers: grid-column: 2 / 4; */

place-items / place-content โ€” align and justify shorthand for grid container.

OC
Written by Our Compiler Technical Editorial Team
Reviewed for accuracy ยท CSS Complete Roadmap ยท Last updated August 2026