Part 12 · Platforms and devices

Chapter 67: Responsive, mobile-first and cross-device design

Part 12 · Platforms and devices8 min read

A web page has no fixed size. The same page may open on a 360-pixel-wide phone, a tablet turned sideways and a 27-inch monitor, and it has to work on each. Designing for that is a layout problem first, but it also changes how a team decides what matters, what to build first and how to check the result.

Responsive and adaptive design

Responsive web design is a way of building one page whose layout adjusts continuously to the width of the screen. Ethan Marcotte named it in A List Apart in May 2010 and gave it three technical ingredients: fluid grids, flexible images and media queries.1 All three existed before; his contribution was combining them and arguing that a site should be designed for every width at once.

Before that, most sites used a fixed-width layout: a page drawn at one set width in pixels, which left wide margins on big monitors and forced sideways scrolling on small screens. Liquid layouts that stretched with the window existed too, but their lines of text grew too long to read on wide screens.2 When smartphones arrived, many companies built a second, simpler site for phones and used server-side detection to send each visitor to one version or the other.2

Adaptive design usually means serving one of a few fixed layouts, each made for a class of device. The choice is made either in the browser, by switching between fixed widths, or on the server, which detects the device and sends different HTML. Amy Schade of Nielsen Norman Group described the trade-off in 2014: responsive design sends the same code to every device, so a phone downloads markup meant for larger screens, while server-side adaptation can send less but needs more versions to maintain.3

Three Android devices, a phone and two tablets of different sizes, each showing the Wikimedia Commons app with a different arrangement of image thumbnails
Figure 67.1 The Wikimedia Commons Android app on a phone and two tablets of different sizes. One app, three arrangements of the same content.

User:tfinc, CC BY-SA 3.0, via Wikimedia Commons.

Fluid grids and flexible images

A fluid grid is a layout grid whose columns are set as proportions of their container instead of fixed pixels (→ 23 Grid systems). Marcotte published the method in 2009 as a formula: target ÷ context = result.5 In his example, a 700-pixel title inside a 988-pixel page becomes 700 ÷ 988, or 70.85% of the page. A column nested inside another takes its parent as the new context, so a 700-pixel block inside an 844-pixel column becomes 82.938%. The designer still draws at a fixed size; the developer converts each width to a share of its container.

Modern CSS does much of this arithmetic itself. The fr unit in CSS Grid divides the free space into fractions, and Flexbox lets items grow and shrink to fill a row (→ 74 HTML and CSS).2

A flexible image is an image that scales down with its container. The usual rule is one line, max-width: 100%, which lets an image shrink to fit a narrow column but never grow past its own size, so it doesn’t blur.2 Its weakness is weight: a phone still downloads the full desktop-sized file and then shrinks it. The fix is to offer several files and let the browser choose with srcset and sizes (→ 35 Resolution, formats and units). A wide image may also need a different crop on a tall phone screen, which the <picture> element allows.

Media queries and breakpoints

A media query is a test in CSS, such as “is the window at least 600 pixels wide?”, that applies a block of styles only when the test is true. The W3C’s Media Queries specification became a Recommendation in June 2012.6 CSS 2 already had media types, such as screen and print; media queries added tests of features like width, height, orientation and resolution.

A breakpoint is a width at which a media query changes the layout: one column becomes two, a row of links becomes a menu button. MDN’s advice is to put a breakpoint where the content starts to look wrong, not at the width of a particular phone, and to write breakpoints in relative units such as em or rem, so they move when the user enlarges the text.2 Lists of “standard” breakpoints at 768 and 1024 pixels match the first iPad of 2010, whose screen was 1024 × 768 pixels, held upright or sideways.7 They’re a convention from one device, not a standard, and the devices people use have long since stopped matching them.

80em (1280 px): layout stops widening 48em (768 px): menu expands, sidebar appears 0360 px 0768 px 01280 px 768 max ~70 characters 360 px base styles (no query) 768 px @media (width >= 48em) 1280 px @media (width >= 80em)
Figure 67.2 One page at three widths. Breakpoints go where the content needs them, written in em so they respect the user’s text size.

The viewport is the area of the browser window the page is drawn in. Early smartphone browsers drew pages in a virtual viewport about 980 pixels wide and then shrank the result, so old desktop sites looked like small pictures of themselves. That also stopped media queries for narrow screens from ever firing. The viewport meta tag, <meta name="viewport" content="width=device-width">, tells the browser to lay the page out at the device’s real width. MDN says to include it on every page, and warns against user-scalable=no, which blocks zoom for people with low vision.8

Two newer tools extend the idea. A container query tests the size of a component’s container rather than the window, so the same card can show a stacked layout in a narrow sidebar and a side-by-side one in a wide column.9 Preference queries test the user’s settings: prefers-reduced-motion is one (→ 36 Motion, video and sound), and prefers-color-scheme reports a dark-mode setting.

Mobile first and progressive enhancement

Mobile first is the practice of designing for the smallest screen first, then adding layout and features as space allows. Luke Wroblewski proposed it in a blog post in November 2009 and expanded it into the book Mobile First (A Book Apart, October 2011).1011 His reasons were that mobile use was growing fast, that a small screen makes a team decide what matters (“Mobile forces you to focus,” he wrote), and that phones offer abilities desktops lack, such as location and touch.10 In CSS, mobile first means the default styles are for the narrowest screen and each min-width media query adds to them.

Mobile first doesn’t mean a cut-down site for phones. Wroblewski’s point was the order of decisions: if the narrow layout holds only what matters, the wide layout gets the same priorities plus room to spread out. Hiding content on phones works against it, and, since Google now indexes the mobile version, content hidden there may also drop out of search.

The case has grown stronger since. StatCounter put mobile at 59.9% of worldwide web page views in October 2026, against 38.5% for desktop.12 The GSMA reported in 2025 that 4.7 billion people, 58% of the world’s population, use mobile internet on their own device, and that in low- and middle-income countries mobile is the main and often the only way people get online.13 Google moved its search index to read the mobile version of pages, a change it began in 2016 and called complete in October 2023. This is mobile-first indexing: content that exists only in a site’s desktop layout may not be indexed.14

Progressive enhancement is the older idea underneath. A page is built so its content works in any browser, as plain HTML, and then styling and scripting are added in layers for browsers that support them. Steve Champeon and Nick Finck presented it at the SXSW conference in Austin in 2003, and Champeon gave it its name.15 Its opposite is graceful degradation: build for the most capable browsers, then check late in the project that older ones still get something usable. Gustafson’s 2008 explanation used a peanut chocolate as the picture: content is the peanut, CSS the chocolate, JavaScript the candy shell, and anyone who can’t take a layer still gets what’s inside.15 GOV.UK’s service manual still tells its teams to use it.16

Cross-device testing

Cross-device testing is checking that a design works on the screens, browsers, inputs and networks its users actually have. No team can test every device, so the list comes from analytics. GOV.UK publishes its own: named browsers on iOS, Android, Windows and macOS that together cover about 98% of visits to the site, plus testing with assistive technology. It also accepts small visual differences between browsers as long as people can still use the service.16

Browser device mode imitates a phone’s screen size and touch input on a desktop computer. It’s quick and catches most layout faults, but Google’s own documentation for Chrome calls it “a first-order approximation”: the code still runs on a desktop processor, so speed and real touch behavior need a real phone.17 Test on at least one low-cost Android phone on a slow connection, not only on the team’s own recent phones (→ 75 JavaScript, browsers and performance). Real devices also show what an imitation misses: the on-screen keyboard covering a form field, a browser toolbar that hides and reappears as the page scrolls, a notch over the corner of a header, and glare when the phone is used outdoors.

Accessibility sets a floor. WCAG success criterion 1.4.10, reflow (level AA), requires content to work at 320 CSS pixels wide without scrolling in two directions. That’s the width a 1,280-pixel window shrinks to at 400% zoom, so a site that fails on narrow phones usually fails for people who enlarge text too.18 Check tap targets against the sizes in → 48 Usability and ergonomics.

In practice

  • Test the widths between your breakpoints, not only at them. Drag the window slowly from narrow to wide.
  • Check both orientations, enlarged system text and browser zoom at 200% and 400%.
  • Put the cheapest phone your users own on the test list.
  • Usability-test the mobile layout with people as well as checking it yourself (→ 53 Usability testing).

See also

21 Typography on screens · 23 Grid systems · 35 Resolution, formats and units · 49 Accessibility and inclusive design · 69 Mobile patterns and gestures · 79 Native, hybrid and web apps

Sources

  • Apple (n.d.). “iPad - Technical Specifications” (original iPad).
  • Chrome for Developers (n.d.). “Simulate mobile devices with device mode.” Google.
  • GOV.UK Service Manual (2026). “Designing for different browsers and devices.”
  • GSMA (2025). The State of Mobile Internet Connectivity 2025, press release, September 9.
  • Gustafson, A. (2008). “Understanding Progressive Enhancement.” A List Apart 269.
  • Gustafson, A. (2011). Adaptive Web Design: Crafting Rich Experiences with Progressive Enhancement. Easy Readers.
  • Marcotte, E. (2009). “Fluid Grids.” A List Apart.
  • Marcotte, E. (2010). “Responsive Web Design.” A List Apart.
  • MDN Web Docs (n.d.). “Responsive web design”; “Viewport meta tag”; “CSS container queries.” Mozilla.
  • Mueller, J. and Kalush, N. (2023). “Mobile-first indexing has landed.” Google Search Central Blog.
  • Schade, A. (2014). “Responsive Web Design (RWD) and User Experience.” Nielsen Norman Group.
  • StatCounter Global Stats (2026). Desktop vs mobile vs tablet market share worldwide.
  • W3C (2012, current edition 2024). Media Queries Level 3.
  • W3C (n.d.). “Understanding Success Criterion 1.4.10: Reflow.”
  • Wroblewski, L. (2009). “Mobile First.” Blog post, November 3.
  • Wroblewski, L. (2011). Mobile First. A Book Apart.

Notes

  1. Marcotte, E. (2010, May 25). “Responsive Web Design.” A List Apart. https://alistapart.com/article/responsive-web-design/ ↩
  2. MDN Web Docs (n.d.). “Responsive web design.” https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/CSS_layout/Responsive_Design ↩ ↩ ↩ ↩ ↩
  3. Schade, A. (2014, May 4). “Responsive Web Design (RWD) and User Experience.” Nielsen Norman Group. https://www.nngroup.com/articles/responsive-web-design-definition/ ↩
  4. Gustafson, A. (2015, January 5). “Revisiting (and Releasing) Adaptive Web Design.” https://www.aaron-gustafson.com/notebook/revisiting-and-releasing-adaptive-web-design/ ↩
  5. Marcotte, E. (2009, March 3). “Fluid Grids.” A List Apart. https://alistapart.com/article/fluidgrids/ ↩
  6. W3C (2024). Media Queries Level 3, W3C Recommendation, with change history from the 19 June 2012 Recommendation. https://www.w3.org/TR/mediaqueries-3/ ↩
  7. Apple (n.d.). “iPad - Technical Specifications” (original iPad, 2010). https://support.apple.com/112438 ↩
  8. MDN Web Docs (n.d.). “Viewport meta tag.” https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Viewport_meta_element ↩
  9. MDN Web Docs (n.d.). “CSS container queries.” https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Containment/Container_queries ↩
  10. Wroblewski, L. (2009, November 3). “Mobile First.” LukeW Ideation + Design. https://www.lukew.com/ff/entry.asp?933 ↩ ↩
  11. Wroblewski, L. (2011). Mobile First. A Book Apart. https://www.lukew.com/resources/mobile_first.asp ↩
  12. StatCounter Global Stats (2026). “Desktop vs Mobile vs Tablet Market Share Worldwide,” October 2026. https://gs.statcounter.com/platform-market-share/desktop-mobile-tablet/worldwide ↩
  13. GSMA (2025, September 9). “GSMA calls for renewed focus on closing the Usage Gap…” Press release for The State of Mobile Internet Connectivity 2025. https://gsma.com/newsroom/press-release/gsma-calls-for-renewed-focus-on-closing-the-usage-gap-as-more-than-3-billion-people-remain-offline-despite-available-mobile-internet-services/ ↩
  14. Mueller, J. and Kalush, N. (2023, October 31). “Mobile-first indexing has landed.” Google Search Central Blog. https://developers.google.com/search/blog/2023/10/mobile-first-is-here ↩
  15. Gustafson, A. (2008, October 7). “Understanding Progressive Enhancement.” A List Apart 269. https://alistapart.com/article/understandingprogressiveenhancement/ ↩ ↩
  16. GOV.UK Service Manual (2026, updated January 30). “Designing for different browsers and devices.” https://www.gov.uk/service-manual/technology/designing-for-different-browsers-and-devices ↩ ↩
  17. Chrome for Developers (n.d.). “Simulate mobile devices with device mode.” https://developer.chrome.com/docs/devtools/device-mode ↩
  18. W3C (n.d.). “Understanding Success Criterion 1.4.10: Reflow.” WCAG 2.2. https://www.w3.org/WAI/WCAG22/Understanding/reflow.html ↩