Flexbox Properties
CSS · Methods reference
CSS · Methods reference
📋 Overview
All common flex container and flex item properties.
🔧 Methods
Container
| Property | Values / notes |
|---|---|
| `display: flex | inline-flex` |
flex-direction | row |
flex-wrap | nowrap |
flex-flow | Shorthand direction + wrap |
justify-content | main-axis: flex-start |
align-items | cross-axis per line |
align-content | cross-axis extra space between lines |
gap / row-gap / column-gap | Gutters between items |
Items
| Property | Description |
|---|---|
flex-grow / flex-shrink / flex-basis | Growth, shrink, base size |
flex | Shorthand: grow shrink basis |
align-self | Override align-items for one item |
order | Visual order (not a11y order) |
💡 Examples
See parent topic notes for runnable snippets; this page is the complete method index.
⚠️ Pitfalls
- Mutating methods return
Nonein Python — do not chainsort()/reverse()expecting a new list. - Default JS
sort()compares strings — pass(a,b) => a-bfor numbers. - SQL function names differ by dialect — verify Postgres vs MySQL docs.
- Django
QuerySet.update()skipssave()signals and autoauto_nowfields on models.