---
source: https://iinventedlight.com/library/notes/css-grid-basics.md
title: "CSS Grid: two-dimensional layout in rows and columns"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (web.dev); CC-BY-4.0 (Chrome Developers); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: web.dev, CSS Grid layout; Chrome Developers, Getting started with CSS Grid. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-23
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-23
as_of: 2026-11-23
confidence: medium
untested: "Not reproduced (2026-11-23). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: css-grid-basics"
tags: [css, grid, layout, web]
client: Librarian
sources:
  - id: S1
    title: "CSS Grid layout"
    publisher: web.dev
    url: https://web.dev/learn/css/grid
    accessed: 2026-11-23
    license: "CC-BY-4.0"
  - id: S2
    title: "Getting started with CSS Grid"
    publisher: Chrome Developers
    url: https://developer.chrome.com/blog/css-grid
    accessed: 2026-11-23
    license: "CC-BY-4.0"
---
# CSS Grid: two-dimensional layout in rows and columns
**Answer:** CSS Grid is a layout method designed for two-dimensional content, in rows and columns at the same time. Flexbox lays out in one dimension, and there is synergy when using the two together.

## What grid adds

Grid is a layout method designed for two-dimensional content. That means laying things out in rows and columns at the same time.

You first define the rows and columns. Items can be placed by you, or the browser can auto-place them into the cells.

Direct children of the grid container will be automatically placed onto this grid.

The grid is made of lines that run horizontally and vertically. Numbering starts from 1.

## Grid and Flexbox

Flexbox made a lot of complex layout tasks easier, but screens commonly have a second dimension.

Grid arranges in two dimensions. Flexbox lays out in one dimension. There is synergy when using the two together.

Despite the similarities in concept and syntax, do not think of them as competing layout techniques.

## See also

- [css-flexbox-basics](https://iinventedlight.com/library/notes/css-flexbox-basics/)
- [javascript-promises](https://iinventedlight.com/library/notes/javascript-promises/)

## Claims

- id: C1
  claim: Grid is designed for two-dimensional content in rows and columns.
  source: S1
  evidence: "layout method designed for two-dimensional content"

- id: C2
  claim: Direct children of the grid container are auto-placed unless you position them.
  source: S1
  evidence: "Direct children of the grid container will be automatically placed"

- id: C3
  claim: Grid lines run horizontally and vertically and are numbered from 1.
  source: S1
  evidence: "Lines are numbered starting from 1"

- id: C4
  claim: Grid is two-dimensional; Flexbox lays out in one dimension.
  source: S2
  evidence: "Grid arranges in two dimensions, while Flexbox lays out in one"

## Sources

- [S1] CSS Grid layout. web.dev. https://web.dev/learn/css/grid . License: CC-BY-4.0. Accessed 2026-11-23.

- [S2] Getting started with CSS Grid. Chrome Developers. https://developer.chrome.com/blog/css-grid . License: CC-BY-4.0. Accessed 2026-11-23.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, CSS Grid layout; Chrome Developers, Getting started with CSS Grid. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
