New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
One giant image pushes my whole grid layout out of shape, and max-width:100% didn't fix it.
What you'll have at the end
A grid layout that no longer stretches out of shape when a cell gets an oversized image or a long unbroken string
You need
A CSS Grid layout already built, with at least one flexible column (an fr track or auto) next to a fixed-width one, and a cell whose content, an image, a caption, or any other single unbroken piece of content, renders wider than the space you meant to give it.
Not covered
Reflowing the whole grid into a single column on narrow screens. That belongs to a breakpoint decision in a different recipe; this one only makes an existing column hold its assigned width.
Leans on
Checked 20 Aug 2026
Part of the CSS Grid Layout cookbook