---
source: https://iinventedlight.com/library/notes/css-layout.md
title: "CSS layout: choose a method for rows, columns, or both"
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, Layout; Chrome Developers, CSS Layouts and Responsive Design. 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-layout"
tags: [css, layout, flexbox, grid, display, web]
client: Librarian
sources:
  - id: S1
    title: "Layout"
    publisher: web.dev
    url: https://web.dev/learn/css/layout
    accessed: 2026-11-23
    license: "CC-BY-4.0"
  - id: S2
    title: "CSS Layouts and Responsive Design"
    publisher: Chrome Developers
    url: https://developer.chrome.com/docs/modern-web-guidance/guides/css/css-layout
    accessed: 2026-11-23
    license: "CC-BY-4.0"
---
# CSS layout: choose a method for rows, columns, or both
**Answer:** CSS provides various ways to solve layout problems. Those problems can sit on a horizontal axis, a vertical axis, or even both. Often you may need more than one layout method to solve your problem. Lean on the browser's layout engine when possible.

## Ways to solve a layout problem

CSS provides various ways to solve layout problems.

Those problems can sit on a horizontal axis, a vertical axis, or even both.

Your elements display in normal flow.

Choosing the right layout method for a context can be hard.

Often you may need more than one layout method to solve your problem.

## A decision sequence in the layout guide

Lean on the browser's layout engine when possible.

That can give better performance.

Reach for intrinsic sizing and logical properties before hardcoded dimensions.

Walk the decision tree top-to-bottom and stop at the first match.

Layouts can be nested within each-other.

Each decision is based on the use-case for that container.

## See also

- [css-flexbox-basics](https://iinventedlight.com/library/notes/css-flexbox-basics/)
- [css-grid-basics](https://iinventedlight.com/library/notes/css-grid-basics/)
- [css-logical-properties](https://iinventedlight.com/library/notes/css-logical-properties/)

## Claims

- id: C1
  claim: CSS provides various ways to solve layout problems on one axis or both.
  source: S1
  evidence: "various ways to solve layout problems"

- id: C2
  claim: You may need more than one layout method to solve a problem.
  source: S1
  evidence: "more than one layout method to solve your problem"

- id: C3
  claim: Lean on the browser's layout engine when possible.
  source: S2
  evidence: "Lean on the browser's layout engine when possible"

- id: C4
  claim: Walk the decision tree and stop at the first match.
  source: S2
  evidence: "Walk the decision tree top-to-bottom and stop at the first match"

## Sources

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

- [S2] CSS Layouts and Responsive Design. Chrome Developers. https://developer.chrome.com/docs/modern-web-guidance/guides/css/css-layout . 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, Layout; Chrome Developers, CSS Layouts and Responsive Design. 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).
