Layouts that adapt
Arrange page content so it reads in order across screen sizes.
A grid that fits narrow screens
The 100% limit lets a track shrink below 184px when its container is narrower.
.cards {
display: grid;
grid-template-columns:
repeat(auto-fit, minmax(min(100%, 184px), 1fr));
gap: 16px;
}
.cards > article {
min-width: 0;
overflow-wrap: anywhere;
}
Begin with the reading order
Write the main headings, paragraphs, and links as one column before placing them in a grid. Move through the page using the Tab key and check that each interactive item arrives where you expect it. Keep the HTML order aligned with the way a reader follows the page so a change of layout preserves that sequence.
Let content set the breakpoint
Stretch the browser until two columns have room for their longest real headings and buttons. Pick your break where that layout starts working. At smaller widths, let columns stack and let text wrap. Test with long names and a larger browser text size, since a layout that fits three short sample labels can still fail with real content.
- Check long words inside cards and tables.
- Look for horizontal scrolling on narrow screens.
- Check the tab order after the layout rearranges.