Responsive Design Testing
One website, every screen from a 320px phone to a 2560px monitor. Learn how viewports and breakpoints work, what to test at each size, and how to find layout bugs with DevTools and real devices.
A hotel booking site launches its redesign. It looks great on laptops and on phones. Then the support tickets start: “How do I log in on my iPad?” Testers had checked a phone (393px wide) and a laptop (1280px wide). Nobody checked an older iPad held upright, which is exactly 768px wide. At that one width, the desktop menu disappears and the mobile hamburger button doesn’t appear yet. No menu, no Sign in, no bookings.
Layouts don’t break at the sizes everyone tests. They break in between. That’s why responsive designResponsive designA website layout that adapts to different screen sizes, from phones to large monitors.Open in glossary → needs its own kind of testing.
Why it matters
- Most traffic is mobile. For many shops, banks and delivery services, more than half of all visits come from phones.
- One page, endless sizes. The same URL must work on a 320px phone, a tablet in both orientations, a laptop and a 4K monitor.
- Bugs hide between devices. A layout can be perfect at 375px and 1280px and broken at 900px, the width of a small laptop window or a tablet in landscape.
- It’s an accessibility topic too. People who zoom to 200% or enlarge the text get the mobile layout on a desktop. If it breaks, they’re locked out.
The core concepts
The viewport
The viewportViewportThe visible area of a web page in the browser window or on the device screen.Open in glossary → is the area of the browser where the page is shown. Its width is measured in CSS pixels, not physical screen pixels. An iPhone 15 has a screen 1179 physical pixels wide, but its viewport is 393 CSS pixels wide: each CSS pixel is drawn with 3×3 physical pixels to keep text sharp.
For a phone browser to use that real width, the page needs one line in its HTML <head>:
<meta name="viewport" content="width=device-width, initial-scale=1">
With the meta viewport tag
The browser uses the device width (for example 393px), so the mobile layout kicks in and text is readable.
Without it
Mobile browsers pretend the screen is about 980px wide and shrink the whole desktop page to fit. Text is tiny, and users have to pinch and zoom.
Breakpoints
A breakpointBreakpointA screen width where a responsive layout changes, for example from one column to two.Open in glossary → is a width where the layout changes, for example from one column to two. Developers write them as media queries in CSS:
/* From 768px and wider: show the navigation links */
@media (min-width: 768px) {
.nav-links { display: flex; }
.hamburger { display: none; }
}
Every team chooses its own breakpoints. These common values (they’re Tailwind CSS defaults) are used in this lesson’s demos:
| Name | Applies from | Typical screens |
|---|---|---|
| base | 0px | Phones in portrait (320–430px) |
| sm | 640px | Large phones in landscape, small tablets |
| md | 768px | Tablets in portrait (768–834px) |
| lg | 1024px | Tablets in landscape, small laptops |
| xl | 1280px | Laptops and desktops |
Mobile-first
Most modern sites are built mobile-first: the base styles are for the smallest screen, and min-width media queries add layout for bigger screens. The older desktop-first approach starts with the desktop and uses max-width queries to remove things for smaller screens.
Why should a tester care? Because mixing the two is a classic source of off-by-one errorsOff-by-one errorA bug where a count or boundary is wrong by exactly one, like counting days instead of nights.Open in glossary →. Look at this:
.nav-links { display: none; }
.hamburger { display: none; }
@media (min-width: 769px) { .nav-links { display: flex; } } /* 769 and wider */
@media (max-width: 767px) { .hamburger { display: block; } } /* 767 and narrower */
At exactly 768px, neither rule applies, and the page has no navigation at all. This is the bug from the hotel story, and it’s why you use boundary value analysisBoundary value analysisTesting values at and just around the edges of valid ranges, where bugs love to hide.Open in glossary →: test at, just below and just above every breakpoint.
Fluid vs fixed layouts
| Layout | How it works | What to watch for |
|---|---|---|
| Fixed | Elements have set widths in pixels (width: 960px) | Horizontal scrolling on small screens, empty space on big ones |
| Fluid | Widths are percentages of the screen (width: 50%) | Elements get absurdly wide or squashed at the extremes |
| Responsive | Fluid layout plus breakpoints where the design changes | Bugs at and between the breakpoints |
Most real sites are responsive, with a few fixed-width parts mixed in. Those fixed parts (a table, an image, a hero text box) are where layouts usually break.
Try it: resize a page
Below is a sample outdoor shop inside a pretend browser. Drag the slider or the handle next to the page, try the device presets and watch the layout change. The ruler marks the breakpoints, and the panel at the bottom tells you which layout rules are active.
Viewport resizer
Drag the slider (or the handle next to the page) and watch the layout change at each breakpoint.
Layout at 393px (base)
- Navigation
- Hamburger menu md
- Search field
- Hidden lg
- Hero
- Image above text md
- Product grid
- 2 columns md / lg
- Compare tents
- Stacked cards sm
- Footer
- 1 column md
What to test
Layout and navigation
- Navigation collapses into a hamburger (or tab bar) on small screens, and the menu opens, closes and scrolls.
- No horizontal scrolling at any width from 320px up. Nothing sticks out to the right.
- Grids change columns sensibly. No orphaned single cards, no squashed columns.
- Sticky headers and banners don’t eat the screen. On a small phone, a sticky header plus a cookie banner plus a promo bar can cover half the viewport.
Content
- Tables turn into cards or scroll inside their own box instead of widening the whole page.
- Images keep their aspect ratio (no stretching or squashing) and aren’t blurry on large screens.
- Text wraps nicely. Long words, emails and URLs don’t overflow (try a German product name).
- Nothing overlaps: text on top of images, buttons on top of each other.
Interaction
- Touch targetsTouch targetThe area of the screen that responds to a tap, which should be large enough for a finger.Open in glossary → are big enough on mobile: at least 44×44 pt on iOS and 48×48 dp on Android, with space between them. (For websites, WCAG 2.2 sets a lower minimum of 24×24 CSS px, criterion 2.5.8.)
- No hover-only features. Menus, tooltips and “quick view” buttons that need a mouse hover are unusable on touch screens.
- Forms work with the on-screen keyboard: the focused field isn’t hidden behind it, and the right keyboard type shows.
The edges
- Smallest supported width: 320px (older and small phones, split-screen on tablets).
- Landscape phones: about 650–930px wide but only 320–430px tall. Sticky headers and modals often don’t fit. (See also orientationOrientationWhether the device is held upright (portrait) or sideways (landscape).Open in glossary → and Orientation and Screen Sizes.)
- Zoom and text size: zoom the browser to 200% and 400%, and increase the text size. WCAGWCAGThe Web Content Accessibility Guidelines, the main international standard for accessibility.Open in glossary → requires content to reflow at a width of 320 CSS px (that’s a 1280px screen at 400% zoom) without scrolling in two directions, and text must work at 200% size without losing content. More in Accessibility Basics.
- Very large screens: 1920px and 2560px. Is the content centered with a sensible max width? Are lines of text too long to read? Are images stretched?
Common bugs
| # | Bug | What you see | Typical severity |
|---|---|---|---|
| 1 | Gap at a breakpoint | At exactly one width (often 768 or 1024px) the menu or a section disappears | High |
| 2 | Horizontal scroll | The page wiggles sideways on phones; content is cut off on the right | Medium–High |
| 3 | Wide table | A table forces the whole page to be wider than the screen | Medium |
| 4 | Hover-only menu | A dropdown can’t be opened on a phone or tablet | High |
| 5 | Overlapping content | Text runs over an image or another element between two breakpoints | Medium |
| 6 | Content below the fold | Sticky banners and headers push the main button out of view on small phones | Medium |
| 7 | Stretched or blurry images | Product photos lose their proportions or look pixelated on wide screens | Low–Medium |
| 8 | Tiny touch targets | Links and icons too small or too close together to tap reliably | Medium |
| 9 | Broken at 200% zoom | Text overlaps or gets cut off; buttons disappear | High (for affected users) |
| 10 | Missing meta viewport | The phone shows a tiny desktop page | High |
Find the bug
The Trailhead shop below has six responsive bugs. Use the resizer like a real tester:
- Try every preset, then type exact widths like 767, 768 and 769.
- Drag slowly from wide to narrow and watch for jumps and overlaps.
- Switch the input to Touch and try every menu.
- Check what’s visible when the page loads on a small phone, then scroll.
🐞 Bug hunt: Responsive outdoor shop
This demo has 6 hidden bugs. Explore it like a tester, then check your findings.
Tip: switch to 100% (scroll) to see wide layouts at real size. In Touch mode there is no hover, just like on a phone or tablet.
- 1
Hint: Test exactly at the md breakpoint, not just around it.
- 2
Hint: Pick a phone width and scroll down to "Compare tents".
- 3
Hint: Choose the iPad Air preset, switch the input to Touch and try to open Categories.
- 4
Hint: Drag the slider slowly between 850 and 1050px and watch the big headline.
- 5
Hint: At 360 or 393px, look for the "Shop the sale" button without scrolling. Then scroll down.
- 6
Hint: Compare the product pictures at iPad Air width and at Laptop or Desktop width.
Notice the screenshots at three widths. For layout bugs, the exact viewport size is part of the steps to reproduce. “On tablet” isn’t enough.
Tools & how-to
Chrome DevTools device mode
- Open DevTools with F12 (Windows) or Cmd+Option+I (Mac).
- Turn on the device toolbar with the phone-and-tablet icon, or Ctrl+Shift+M / Cmd+Shift+M.
- Pick a size. Choose a device from the Dimensions list, or choose Responsive and type any width and height. Drag the handles on the side to resize.
- Show the breakpoints. Open the ⋮ menu in the device toolbar and choose Show media queries. Colored bars appear above the page; click one to jump right to that breakpoint. Show rulers adds rulers too.
- Add your own devices. Dimensions › Edit… › Add custom device, for example the exact phones in your analytics.
- Rotate with the rotate icon to test landscape.
- Take evidence. ⋮ › Capture screenshot saves what you see; Capture full size screenshot saves the whole page.
Firefox has Responsive Design Mode (Ctrl+Shift+M / Cmd+Option+M), and Safari has Develop › Enter Responsive Design Mode.
Test around every breakpoint
Treat each breakpoint like a boundary in a form field (boundary value analysis). For a breakpoint at 768px, test 767, 768 and 769px. Do the same for every breakpoint the site has, plus the smallest width you support (320px).
Resize slowly
Device presets only show you a handful of widths. Also drag the page width slowly from your widest to your narrowest size and watch for jumps, overlaps, text that suddenly wraps badly, and a horizontal scrollbar appearing.
Zoom and text size
- Browser zoom: Ctrl/Cmd + + up to 200%, then 400%. At 400% on a 1280px window you’re effectively at 320px, so the mobile layout must work.
- Text-only size: Chrome Settings › Appearance › Font size, Safari on iPhone aA › bigger A in the address bar, Firefox View › Zoom › Zoom Text Only.
- Phone settings: larger text in iOS and Android settings affects many mobile websites too.
Real phones and tablets
DevTools is fast for checking layouts, but always confirm on at least one real iPhone and one real Android phone, plus a tablet if your users have them. Real devices show the browser toolbars, the notch and safe areaSafe areaThe part of the screen not covered by the notch, Dynamic Island, rounded corners or home indicator.Open in glossary →, the on-screen keyboard and real touch.
What device mode can’t show you
- It’s still your desktop browser. Choosing “iPhone” in Chrome renders with Chrome’s engine, not Safari’s. (See Cross-browser Testing.)
- No real browser UI: no collapsing toolbar, no notch, no on-screen keyboard pushing the page up.
- Touch is simulated with a mouse. Hover states can still trigger, so hover-only bugs can slip through.
- Not real performance or screens: your laptop is much faster, and colors, brightness and pixel density differ from a real phone.
Example test cases
TC-RWD-001Exactly one navigation is visible at and around each breakpointedgehigh
Preconditions
- Breakpoints known: 640, 768, 1024, 1280px
Steps
- Open the home page in DevTools device mode (Responsive)
- Set widths 767, 768, 769px
- Repeat for 1023, 1024, 1025px
Expected result
At every width either the hamburger or the navigation links are visible, never both and never neither.
TC-RWD-002No horizontal scrolling from 320px upnegativehigh
Steps
- Set the viewport to 320px wide
- Scroll through the whole page, including tables and footers
- Repeat at 360, 393 and 430px
Expected result
The page never scrolls sideways; wide tables scroll inside their own container or change to cards.
TC-RWD-003Menus work on touch devicespositivehigh
Preconditions
- Real tablet (e.g. iPad in landscape) or phone
Steps
- Open the site
- Tap "Categories"
- Tap a category
- Open the menu again and tap outside it
Expected result
The menu opens on tap, the link navigates, and tapping outside closes the menu.
TC-RWD-004Main call to action is visible on load on a small phoneedgemedium
Preconditions
- Viewport 360×640, cookie and promo banners shown
Steps
- Open the home page as a new visitor
- Do not scroll
Expected result
The main button ("Shop the sale") is visible without scrolling, and banners can be closed.
TC-RWD-005Content reflows at 400% zoomedgemedium
Preconditions
- Desktop browser window 1280px wide
Steps
- Zoom the browser to 200%, then 400%
- Read the page and use the navigation
- Fill in and submit the newsletter form
Expected result
All content and functions remain available without scrolling in two directions; no overlapping or cut-off text (WCAG 1.4.10 Reflow).
TC-RWD-006Images keep their proportions on large screenspositivelow
Steps
- Set the viewport to 1280, 1440, 1920 and 2560px
- Look at the product images and the hero banner
Expected result
Images are never stretched or squashed, and the content has a sensible maximum width.
Tip: click a test case to expand it.
Checklist
Responsive design testing checklist
0 of 12 checked
Check your understanding
Quick quiz
0/5 answered · 0 correct
1.The site has a breakpoint at 1024px. Which widths are the best test values?
2.On a phone, a website shows a tiny, zoomed-out desktop layout. What is the most likely cause?
3.A dropdown menu opens on hover in DevTools device mode, but not on a real iPad. Why might device mode miss this?
4.What does WCAG reflow require?
5.Which approach finds the most responsive bugs?
Key takeaways
- The viewport is measured in CSS pixels, and mobile pages need the meta viewport tag (without blocking zoom).
- Breakpoints are where layouts change. Test at, just below and just above each one: that’s where off-by-one bugs hide.
- Most sites are mobile-first; fixed-width parts inside fluid layouts are where things break.
- Test navigation, tables, images, text, touch targets, hover, sticky elements, horizontal scroll, landscape, zoom to 200–400% and very large screens.
- Use DevTools device mode with custom widths and slow resizing, then confirm on real phones and tablets: device mode isn’t a real mobile browser.
Finished this page?Nice work, this page is complete!
Mark it as done to track your progress. It's saved in this browser, no account needed.
Its review cards are now in Bites ⚡