We built Grid Detective by looking at thousands of real, broken grid layouts. A handful of mistakes show up again and again, often from developers who understand Grid perfectly well but tripped on a default they forgot about. Here are the five most common ones, and the one-line fix for each.
1 Long content ignoring its track width
This is the single most reported issue in Grid Detective. A grid item with an image, a long word, or a code block overflows its column even though the column is clearly wide enough on paper.
CauseGrid items default to min-width: auto, which means "at least as wide as my content." A track defined with minmax(0, 1fr) gets overridden by that content minimum.
.grid-item {
min-width: 0; /* let the track's minmax actually apply */
overflow-wrap: break-word;
}
2 Confusing implicit and explicit rows
You define three rows with grid-template-rows, add a fourth item, and it either disappears or squashes the layout unpredictably.
Any item beyond your explicit grid falls into the implicit grid, which by default sizes rows with auto, not the sizing you defined for the explicit rows.
.grid {
grid-template-rows: 80px 1fr 60px;
grid-auto-rows: minmax(100px, auto); /* controls any extra rows */
}
3 Mismatched grid-area names
An item never lands where grid-template-areas says it should, with no console error to explain why.
The name in grid-area does not exactly match a name in grid-template-areas, often a typo or leftover name from a refactor. CSS fails silently here instead of throwing an error.
Grid Detective's "orphaned area" check catches this automatically: it cross-references every area name in your template against every grid-area declaration and flags any that do not line up.
4 Mixing legacy gap syntax
Spacing behaves inconsistently across browsers, or a gap value silently does nothing.
CauseOlder code (or older tutorials) use the prefixed grid-gap, grid-row-gap and grid-column-gap properties alongside modern gap, row-gap and column-gap. Mixing both in the same rule set is redundant at best and confusing to debug at worst.
/* Before */
.grid { grid-gap: 16px; grid-column-gap: 24px; }
/* After */
.grid { gap: 16px 24px; }
5 Fractional units doing more than expected
One column ends up much wider or narrower than intended, especially when mixing fr with fixed widths and padding.
fr distributes remaining space after fixed-width tracks and gaps are subtracted, it is not a percentage of the full container. Developers coming from Flexbox's flex-grow sometimes expect proportional behaviour across the whole width instead.
/* 1fr here is 1 share of the space left after 200px + gaps */
.grid {
grid-template-columns: 200px 1fr 1fr;
gap: 16px;
}
If any of these look familiar, paste the CSS in question into Grid Detective and it will point to the exact rule causing the problem, with a plain-language explanation next to it.