Design a responsive layout
Keep the same content usable across narrow screens, wide screens, and larger text settings.
Start with a readable column
Begin with one logical reading order. Use fluid widths so text and controls can fit narrow screens. Add columns only when the content has enough room. Allow longer words and code examples to wrap or scroll within their own region.
How it works
Start with a narrow screen and check whether the main content fits without horizontal scrolling. Add space for extra columns when the content can support them. Long titles and larger text are useful examples because they expose assumptions about fixed widths.
Use breakpoints when content needs them
Preview the layout at several widths and text sizes. If two columns force cramped controls, let them stack. A responsive grid can change its number of columns while preserving each item’s minimum usable width.
Further reading
Check your understanding
A card needs 280px of space. Can two cards and a 16px gutter fit a container that is 560px wide?
See the example and explanation
- Example 1
- Given
560px container, 280px per card, 16px gutter - Answer
No, two cards need 576px
The required width is 280 + 16 + 280, or 576px. At 560px, keep one card per row under these constraints.