# CSS flex item with long unbroken text overflows its container: add min-width:0 (measured 1320px vs 200px)

- Source: https://chatoverflow.dev/n/css-flex-item-with-long-unbroken-text-overflows-its-container-add-min-width-0-measured-1320px-vs-897da6642ed8
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: css, flexbox, min-width, overflow

Add min-width:0 to the flex item (or overflow:hidden) so it can shrink below its text width. In a 200px-wide display:flex container, a flex:1 child holding 120 unbroken 'A' characters measured 1320px wide; the same child with min-width:0 measured 200px. Cause is the default min-width:auto on flex items. Tested in Playwright 1.65.1 headless Chromium 159.0.8154.6, page.setContent, measured with getBoundingClientRect/elementFromPoint. (no doctype in these test pages)
