Learn mobile-first responsive design: start with content priorities, use fluid layouts and sensible breakpoints, and test on real devices.
In this article
Mobile-first responsive design means you design for the smallest screen first, decide what truly matters, and then enhance the layout as space grows. It works because a phone forces you to prioritise content and actions, and because it is far easier to add to a simple layout than to strip down a complex one. Done well, one codebase serves phones, tablets, laptops and large monitors without separate sites.
This article sets out the principles in a practical order, with CSS examples and a checklist you can apply to a new build or to an existing site that struggles on small screens.
Why start small
There are three practical reasons to begin with the phone.
- Constraint clarifies priorities. With very little room, you must decide which headline, which action and which piece of information come first. Those decisions improve the desktop version too.
- Simpler CSS. Base styles describe a single column. Larger screens add rules. Going the other way means writing desktop rules and then overriding them repeatedly.
- Real usage. For many business sites a large share of visits come from phones. Check your own analytics rather than assuming, since it depends on your audience and sector.
Mobile-first is also not the same as mobile-only. A desktop visitor with a wide screen should get a layout that uses the space well, not a stretched phone page.
Begin with content, not breakpoints
Before opening a design tool, list what each page must do and rank it. For a service page, a sensible order might be: what this is, who it is for, why it helps, proof or detail, and how to get in touch. For a product screen it might be the current status, the next action and the supporting detail.
- Write the content in a single column, in priority order.
- Mark the one primary action per screen.
- Identify what can be hidden behind a disclosure, such as a collapsible section, without harming comprehension.
- Only then sketch how the content could spread across columns on a wider screen.
This content-first approach keeps the page honest. If a block cannot justify space on a phone, ask whether it deserves space on a desktop. Our guide to UX research methods for small teams can help you check priorities with real users rather than opinions.
Use fluid layouts and flexible units
Fixed pixel widths are the enemy of responsive design. Prefer layouts that stretch and shrink.
- Relative units: use rem for type and spacing, percentages or fr units for widths, and max-width to cap line length.
- Flexbox and Grid: let the browser wrap and distribute items. A grid with repeat(auto-fit, minmax(16rem, 1fr)) creates a card layout that adapts without a single media query.
- Fluid type: the clamp() function lets a heading grow between a minimum and maximum size as the viewport changes.
- Images that scale: set max-width: 100% and height: auto, and always include width and height attributes so the page does not jump while loading.
.card-grid {
display: grid;
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem); }
Remember the viewport meta tag, which tells mobile browsers to use the device width. Without it, many phones render a zoomed-out desktop page.
Choose breakpoints from the content
Instead of targeting specific phone or tablet models, which change constantly, add a breakpoint where the layout stops working. Start with your single-column base, widen the browser slowly, and note where lines get too long to read comfortably, where whitespace becomes awkward, or where a second column would help.
In CSS, a mobile-first approach uses min-width queries:
.layout { display: block; }
@media (min-width: 48rem) {
.layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
}
Using rem rather than pixels in queries respects a user's browser font size. Most sites need a small number of breakpoints. If you find yourself with a dozen, the underlying layout is probably too rigid, and container queries, which respond to a component's own width rather than the viewport, may simplify things where browser support meets your policy.
Design for touch, thumbs and small screens
A finger is much less precise than a mouse pointer, and phones are often used one-handed.
- Tap targets: aim for at least 44 by 44 CSS pixels for buttons and links, with space between them. WCAG 2.2 sets a minimum target size, so check the current criteria on the W3C site.
- No hover-only behaviour: touch screens have no hover. Anything revealed on hover must also be available by tap or focus.
- Thumb reach: key actions often work best near the bottom or middle of the screen, rather than only in the top corners.
- Readable text: keep body text at 16px or larger and line length to a comfortable measure.
- Inputs: use the correct input types and a 16px font size so keyboards fit the task and browsers do not zoom unexpectedly.
Navigation deserves particular care. A compact menu behind a clearly labelled button, with large touch targets and a visible way to close it, works for most sites. Avoid patterns that depend on precise gestures with no visible alternative. Our article on mobile app UX patterns that reduce drop-off explores related thinking for apps.
Keep it fast on real networks
Phones are often on slower or less stable connections than the laptop you design on. Performance is part of responsive design, not an afterthought.
- Serve appropriately sized images using srcset and sizes, and modern formats where supported. See image optimisation for fast websites.
- Load only the JavaScript a page needs, and defer what can wait.
- Lazy-load images below the fold, but not the main image at the top of the page.
- Avoid layout shifts by reserving space for images, embeds and late-loading content.
- Watch the Core Web Vitals, explained in Core Web Vitals explained and improved.
Be wary of hiding large desktop assets with display: none on mobile. The browser may still download them. Use responsive image techniques or conditional loading instead.
Test on real devices, not just a resized window
A narrow desktop browser is a useful start, but it is not a phone. Real devices reveal touch problems, keyboard overlaps, safe-area issues around notches, and performance limits.
| What to check | How |
|---|---|
| Layout at multiple widths | Browser developer tools device mode, then slow widening |
| Touch targets and gestures | A real phone and a real tablet |
| Text zoom and larger fonts | Increase the browser or system font size |
| Landscape orientation | Rotate the device on key screens |
| Slow network | Throttling in developer tools, then a real mobile connection |
| Accessibility | Keyboard only, screen reader, zoom to 200 percent |
Include a few older or lower-powered devices if your audience uses them. And test the forms, since they are where phones cause the most pain; see form design best practices for what to look for.
Common mistakes
- Designing the desktop layout first and squeezing it down at the end.
- Using breakpoints named after devices instead of content needs.
- Horizontal scrolling caused by a single wide table, image or code block. Give wide tables a scrollable wrapper, and always check for overflow.
- Tiny tap targets packed close together.
- Hiding important content on mobile instead of reorganising it.
- Disabling zoom, which harms accessibility.
What to do next
- Pick your most visited page and list its content in priority order.
- Rebuild or review the layout as a single column first, using fluid units.
- Add breakpoints only where the layout breaks.
- Test on at least one real phone and one tablet.
- Measure speed and usability on a mobile connection and fix the biggest issue first.
If you would like help with this, the CloudWiss team in Dublin can talk it through, whether you are planning a new site or improving an existing one through our UI/UX and product design service.
Share this article
General educational information, not legal or professional advice for your specific situation.
