Testing

Flexbox: Browser Support, Features, Limitations

Flexbox works in Chrome 29+, Edge 12+, Firefox 28+, Safari 9+, Opera 12.1+, Samsung Internet 4+, and Android Browser 4.4+. Learn Flexbox support and quirks.

Author

Prince Dewani

May 1, 2026

Flexbox is a W3C CSS Flexible Box Layout Module Level 1 spec that arranges items along a single row or column with flexible sizing. It works in Chrome 29+, Edge 12+, Firefox 28+, Safari 9+ on macOS and iOS, Opera 12.1+, Samsung Internet 4+, and Android Browser 4.4+, with partial prefixed support in Internet Explorer 10 and 11.

This guide covers Flexbox, the browsers that support it, key features, Flexbox versus CSS Grid, how to check support, and known issues.

What is Flexbox?

Flexbox is the CSS Flexible Box Layout Module Level 1, a W3C specification that lays out items along a single axis. The display: flex declaration creates a flex container, and its direct children become flex items that grow, shrink, and align to fit the parent.

Which browsers does Flexbox support?

Flexbox is Baseline Widely Available and ships in every modern desktop and mobile browser. Chrome 29, Edge 12, Firefox 28, Safari 9 on macOS and iOS, Opera 12.1, Samsung Internet 4, and Android Browser 4.4 all enable the unprefixed display: flex syntax by default. Internet Explorer 10 and 11 support an older draft with the -ms- prefix only.

Loading browser compatibility data...

Flexbox compatibility in Chrome

Chrome supports unprefixed display: flex from Chrome 29 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 21 through 28 shipped the modern syntax behind the -webkit- prefix on every flex property. Chrome 4 through 20 only knew the deprecated display: box draft. Chromium-based WebView inherits the unprefixed property once the system WebView updates past 29.

Flexbox compatibility in Edge

Microsoft Edge supports unprefixed display: flex from Edge 12 on Windows, macOS, and Linux. Legacy EdgeHTML versions inherited several Internet Explorer 11 Flexbox bugs around min-height and flex-basis on column layouts. Modern Chromium-based Edge fixes those quirks because it shares the same Blink engine that Chrome ships.

Flexbox compatibility in Firefox

Firefox supports unprefixed display: flex from Firefox 28 on Windows, macOS, Linux, and Android. Firefox 22 through 27 shipped an earlier draft with -moz- prefixes and known wrap bugs. Firefox 2 through 21 only knew the deprecated display: box draft. Firefox for Android shares the same Gecko engine, so mobile picks up Flexbox from Firefox 28 onward without a separate flag.

Flexbox compatibility in Safari

Safari supports unprefixed display: flex from Safari 9 on macOS and from iOS 9 on iPhone and iPad. Safari 6.1 through 8.4 read the modern syntax behind -webkit- prefixes and shipped a min-height: auto edge case that breaks wrapping. Safari 3.1 through 6 on macOS and Safari on iOS 3.2 through 6.1 only knew the older display: box draft.

Flexbox compatibility in Opera

Opera supports unprefixed display: flex from Opera 12.1 on the Presto engine and continues from Opera 17 on Blink. Opera 9 through 12.0 did not support Flexbox at all. Opera Mobile follows the desktop track from Opera Mobile 12.1 onward and inherits the same Blink Flexbox implementation that Chrome 29 uses on Android.

Flexbox compatibility in Samsung Internet

Samsung Internet supports unprefixed display: flex from Samsung Internet 4 on Galaxy phones and tablets. The browser shares the underlying Chromium engine with Chrome on Android, so Flexbox arrived on the same Blink milestone that Chrome 29 shipped. Older Samsung Internet builds before version 4 fall back to the legacy Android Browser stack.

Flexbox compatibility in Android Browser

Android Browser supports unprefixed display: flex from version 4.4 KitKat onward. Android Browser 4.0 through 4.3 read the modern syntax behind the -webkit- prefix. Android Browser 2.1 through 3.x only knew the older display: box draft. WebView on Android 5.0 and later inherits the modern Chromium engine, so apps that embed WebView pick up Flexbox once the system WebView updates past Chromium 29.

Flexbox compatibility in Internet Explorer

Internet Explorer 10 and 11 ship a partial Flexbox implementation behind the -ms- prefix that follows an older 2012 draft. Known bugs include a min-height regression, flex-basis ignored on flex-direction: column, and a flex-shrink default of 0 instead of 1. Internet Explorer 5.5 through 9 do not support Flexbox at all. Users on Windows should switch to Microsoft Edge or Chrome for full support.

Note

Note: Flexbox breaks across older Safari, Internet Explorer 11, and prefixed Android stacks. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the key features of Flexbox?

Flexbox replaces a stack of float, inline-block, and table-cell hacks with a small set of declarative properties. Each feature solves a layout problem that used to need brittle margin math.

  • One-dimensional layout: Flexbox arranges items along the main axis set by flex-direction. Pick row, row-reverse, column, or column-reverse, and the cross axis runs perpendicular. This shape fits navigation bars, toolbars, button rows, and form field groups.
  • Flexible item sizing: The flex shorthand combines flex-grow, flex-shrink, and flex-basis. Items grow to claim free space, shrink to avoid overflow, or hold a fixed flex-basis. A flex: 1 child fills any remaining track without a width math ladder.
  • Alignment on both axes: justify-content positions items along the main axis with values like flex-start, center, space-between, and space-evenly. align-items aligns items along the cross axis. align-self overrides the parent for a single item, which removes the need for negative margins to recenter one child.
  • Wrap and gap control: flex-wrap toggles wrapping when items overflow a single line, and the gap property sets row and column spacing between items without margin tricks. Gap support shipped in Chrome 84, Firefox 63, and Safari 14.1, so target those baselines if you rely on it.
  • Visual order without DOM changes: The order property reorders items at render without moving them in the markup. This keeps screen reader order tied to the source while letting CSS swap the visual sequence at breakpoints.

What is the difference between Flexbox and CSS Grid?

Flexbox and CSS Grid both ship as W3C layout modules, but they solve different problems. Flexbox handles a single axis at a time. CSS Grid handles rows and columns together. Pick by the shape of the layout, not by personal preference.

DimensionFlexboxCSS Grid
Layout axisOne-dimensional, row or columnTwo-dimensional, rows and columns together
Best fitComponent-level alignment, toolbars, navigation, button rowsPage-level layout, dashboards, magazine grids, card galleries
Item sizing modelItems grow and shrink based on flex-grow, flex-shrink, and flex-basisItems fill named or numbered tracks set by grid-template-columns and grid-template-rows
Source orderVisual order via the order property, source order otherwiseItems can jump to any cell with grid-column and grid-row, independent of source order
Browser baselineChrome 29, Edge 12, Firefox 28, Safari 9Chrome 57, Edge 16, Firefox 52, Safari 10.1
Internet Explorer 11Partial with -ms- prefix and several bugsPartial, older 2011 draft only, no auto-placement

How do you check if a browser supports Flexbox?

The cleanest check is the @supports at-rule with a property and value pair. Wrap Flexbox rules so the browser only applies them when the engine parses display: flex, and pair the rule with @supports not to ship a float or inline-block fallback for legacy browsers.

/* Wrap Flexbox rules in @supports so legacy engines fall through to the
   block float fallback below. Browsers that recognize display: flex apply
   the modern layout, while older builds keep a working layout. */
@supports (display: flex) {
    .toolbar {
        display: flex;
        gap: 12px;
        align-items: center;
    }
}

@supports not (display: flex) {
    .toolbar > * {
        display: inline-block;
        vertical-align: middle;
        margin-right: 12px;
    }
}

For runtime checks, the CSS.supports JavaScript API parses the same property and value pair. Paste this snippet into the DevTools console of any browser to see whether the engine recognizes Flexbox.

// Paste into any browser DevTools console to check Flexbox support at
// runtime. CSS.supports parses the property and value pair and returns
// a boolean.

const supportsFlexbox = CSS.supports('display', 'flex');
console.log(`Flexbox supported in this browser: ${supportsFlexbox}`);

// Logs true on Chrome 29+, Edge 12+, Firefox 28+, Safari 9+, Opera 12.1+,
// Samsung Internet 4+, and Android Browser 4.4+. Logs false on Internet
// Explorer 9 and older browsers that predate the modern syntax.

If CSS.supports returns false, the browser does not parse display: flex at all. Use the @supports not block above to ship a float or inline-block layout instead of leaving the page collapsed. Modernizr.flexbox provides the same check on browsers that predate CSS.supports.

...

What are the known issues with Flexbox?

Flexbox is Baseline Widely Available, but a handful of cross-browser bugs still hit production sites. Plan around these before you ship Flexbox to a long browser tail.

  • Internet Explorer 11 min-height bug: Internet Explorer 11 ignores min-height on a flex container set to flex-direction: column, which collapses the parent below the child content. Set height instead of min-height, or add a wrapper div with the height set on the outer element.
  • Internet Explorer 11 flex-basis on column: Internet Explorer 11 ignores flex-basis on flex-direction: column items and treats every item as flex-basis: auto. Set explicit width and height on the items, or run rules through Autoprefixer with the flexbox: no-2009 hint.
  • Safari 6.1 to 8.4 min-height: auto: Older Safari builds resolve min-height: auto on flex items differently and can stop items from shrinking below their content. Set min-height: 0 and min-width: 0 on flex items to keep wrapping consistent.
  • Gap on flex containers needs a newer baseline: The gap property only works on Flexbox from Chrome 84, Firefox 63, and Safari 14.1. Older Safari 9 to 14 builds ignore the gap and items collapse together. Fall back to margin: 0 8px 8px 0 with a negative margin on the parent for those builds.
  • Image stretching in row layouts: A direct img child of a flex container stretches to the cross axis when align-items defaults to stretch, which warps the picture. Set align-items: flex-start on the parent or align-self: flex-start on the img to keep the natural aspect ratio.
  • In my experience, the silent failure that bites teams the most is a flex item with a long word that overflows the container: the default min-width: auto on flex items refuses to shrink below the longest word, so the row pushes past the parent and triggers horizontal scroll on phones. Set min-width: 0 on the item and overflow-wrap: anywhere on the text to fix it before QA finds the broken layout.
...

Citations

All Flexbox version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests