๐Ÿ“
Websites

CSS Flexbox: the modern web layout tool

20.12.2026
โ† All articles

CSS Flexbox is a one-dimensional (1D) layout technology. It arranges elements horizontally or vertically. Since 2014 it has reshaped web design.

Container and items

display: flex on the parent. Children become flex items.

Main axis and cross axis

flex-direction: row (default), column, row-reverse, column-reverse.

justify-content (main axis)

flex-start, flex-end, center, space-between, space-around, space-evenly.

align-items (cross axis)

stretch (default), flex-start, flex-end, center, baseline.

flex-wrap

wrap โ€” items move to a new line.

Item properties

flex-grow, flex-shrink, flex-basis. Shorthand: flex: 1 0 auto.

order

Changes the order of items.

gap

Space between items without margin tricks.

Nav example

display: flex, justify-content: space-between, align-items: center.

Cards example

display: flex, flex-wrap: wrap, gap, flex: 1 0 300px.

Flexbox vs Grid

Flexbox is 1D. Grid is 2D. Different jobs.

Support

All modern browsers. IE 10+ partial.

Sayt.uz

Header, blog grid, footer use Flexbox. Mobile switches direction via media queries.

Related articles

๐ŸŒŠ Webflow analysis: a professional no-code platform for designers ๐ŸŽจ Tilda site builder analysis: a popular CIS/Russia platform ๐Ÿ—๏ธ JAMstack architecture: the modern web standard โšก Static Site Generators: speed and security champions
๐ŸŒ Language
๐Ÿ‡บ๐Ÿ‡ฟ O'zbek ๐Ÿ‡บ๐Ÿ‡ฟ ะŽะทะฑะตะบ ๐Ÿ‡ท๐Ÿ‡บ ะ ัƒััะบะธะน ๐Ÿ‡ฌ๐Ÿ‡ง English โœ“