coderef

FlexboxBaseline · Widely available

Flexbox is a one-dimensional layout system, which places content either horizontally or vertically, with optional wrapping.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 30, 2015. Widely available since Mar 30, 2018.

Browser support

DesktopChrome
1–28Not supported
29+Supportedsince Aug 20, 2013
Current: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
1–19Not supported
20+Supportedsince Apr 2, 2013
Current: 157
Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27
MobileChrome Android
18–28Not supported
29+Supportedsince Aug 21, 2013
Current: 155
Firefox Android
4–19Not supported
20+Supportedsince Apr 2, 2013
Current: 157
Safari iOS
1–8Not supported
9+Supportedsince Sep 16, 2015
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

CSS
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toolbar .search {
  flex: 1;
}

Feature detection

CSS · check before using
@supports (display: flex) {
  .row { display: flex; }
}

Sub-features

Support for each part of the feature (84). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
align-content291228929289
align-content.baseline577945957459
align-content.context_flex291228929289
align-content.end93934515.6934515.6
align-content.first_baseline59795211595211
align-content.last_baseline✕✕52✕✕52✕
align-content.normal291228929289
align-content.safe1151156317.61156317.6
align-content.space-evenly60795211605211
align-content.start93934515.6934515.6
align-content.stretch577952957529
align-content.unsafe1151156317.61156317.6
align-items291220929209
align-items.baseline297928929289
align-items.center291228929289
align-items.context_flex521220952209
align-items.context_flex.end_in_flex93934515.4934515.4
align-items.context_flex.start_in_flex93934515.4934515.4
align-items.end57795211575211
align-items.first_baseline59795211595211
Show 64 more
Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
align-items.last_baseline1081085216.21085216.2
align-items.safe1151156317.61156317.6
align-items.start57795211575211
align-items.unsafe1151156317.61156317.6
align-self291220929209
align-self.auto297928929289
align-self.baseline297928929289
align-self.context_flex361220936209
align-self.context_flex.stretch_in_flex577952957529
align-self.end93934515.4934515.4
align-self.first_baseline59795211595211
align-self.last_baseline1081085216.21085216.2
align-self.normal297928929289
align-self.safe1151156317.61156317.6
align-self.start93934515.4934515.4
align-self.stretch297928929289
align-self.unsafe1151156317.61156317.6
display.flex291220929209
display.inline-flex291220929209
flex291222929229
flex-basis291222929229
flex-basis.auto291222929229
flex-basis.content94946115.4946115.4
flex-basis.fit-content94949416949416
flex-basis.max-content94946616946616
flex-basis.min-content94946616946616
flex-direction291222929229
flex-direction.column291222929229
flex-direction.column-reverse291281929819
flex-direction.row291222929229
flex-direction.row-reverse291281929819
flex-flow291228929289
flex-grow291220929209
flex-grow.less_than_zero_animate497932✕4932✕
flex-shrink291220929209
flex-wrap291228929289
flex-wrap.nowrap291228929289
flex-wrap.wrap291228929289
flex-wrap.wrap-reverse291228929289
flex.none291222929229
justify-content291220929209
justify-content.flex_context521220952209
justify-content.flex_context.left_right939352993529
justify-content.flex_context.safe_unsafe1151156317.61156317.6
justify-content.flex_context.space-evenly60795211605211
justify-content.flex_context.start_end93934515.4934515.4
justify-content.flex_context.stretch577952957529
justify-content.left297920929209
justify-content.normal297920929209
justify-content.right297920929209
justify-items521220952209
justify-items.center527920952209
justify-items.flex_context521220952209
justify-items.left527920952209
justify-items.legacy527920952209
justify-items.right527920952209
order291220929209
place-content597945959459
place-content.flex_context597945959459
place-items59794511594511
place-items.flex_context59794511594511
place-self59794511594511
place-self.flex_context59794511594511
position.absolutely_positioned_flex_children52125211525211