Skip to content

Placement: Lines, Span & Negative Lines

Auto-placement is polite.

This is where you stop being polite.

Grid placement is line-based:

  • Lines start at 1
  • You choose start / end or start / span
  • Anything not placed stays in auto-flow

grid-column: 1 / 3;
grid-row: 2 / 4;
grid-column: 2 / span 2;
grid-row: 1 / span 3;

Same power. Different mental model.


Grid lines also count backward.

  • -1 → last line
  • -2 → second-to-last
grid-column: -3 / -1;

You don’t need to know how many columns exist.
You just aim for the edge.



Auto-placement is convenience.

Placement is intent.

Negative lines make that intent resilient.


📘 Grid Lines & Spans Study Guide (PDF)

📘 Grid Lines & Spans Infographic (PNG)

Infographic explaining CSS Flexbox direction and axes, showing how flex-direction defines the main axis and cross axis, with visual examples for row, row-reverse, column, and column-reverse, and how justify-content and align-items map to each axis.

Named spaces are easier to work with than edge lines.