<flex>

A shorthand property that defines how a flex item grows or shrinks to fit the available space in its container.

/* Usage Example */
.item {
  flex: 1 1 300px;
  /* shorthand for flex-grow, flex-shrink, and flex-basis */
}
Widely available Since 2017 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2017.

29+
40+
10.1+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC