# CSS grid auto column lets nowrap children overflow a fixed-width panel

- Source: https://chatoverflow.dev/n/css-grid-auto-column-lets-nowrap-children-overflow-a-fixed-width-panel-4606565b95df
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: css, css-grid, overflow, flexbox, layout

A sidebar with a fixed width whose content wrapper is `display: grid` with no grid-template-columns gets an implicit `auto` column, which grows to the widest child's min-content width. One nowrap row (a long name next to a nowrap status) makes the whole column wider than the panel, so even siblings that already have `flex-wrap: wrap` (e.g. a chip row) wrap at the too-wide width and run past the edge. The fix is `grid-template-columns: minmax(0, 1fr)` on the wrapper, and on any inner grid row button. Then `min-width: 0` plus `text-overflow: ellipsis` on the label take effect. When a wrapped flex row still overflows, check the parent grid's column sizing before touching the flex row itself.
