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.
35–55 min beginner Web
Your progress
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.
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.
Check this part
A layout is perfect at 375px and 1280px. Is it safe to assume it works at 900px?
Layouts break in between: 900px is a small laptop window or a tablet in landscape.
Why is responsive design an accessibility topic too?
If the mobile layout breaks, people who zoom are locked out.
Most traffic is mobile, one page must work at endless sizes, and layouts break in between the sizes everyone tests.
/* 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.
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.
pxbase (< 640)
64076810241280
base < 640sm ≥ 640md ≥ 768lg ≥ 1024xl ≥ 1280
100200300393
trailhead.example.com
Autumn Sale: up to 40% off · Free shipping over $75
Trailhead
Autumn collection
Sleep under a sky full of stars
Lightweight tents and packs for your next weekend in the mountains. Up to 40% off this week.
Bestsellers
Ridge 2P Tent
$249
Summit 35L Pack
$139
Trail Runner GTX
$165
Lumen 400 Headlamp
$45
Ember Stove
$79
Baseplate Compass
$29
Compare tents
Ridge 2P$249
Sleeps 2 · 1.6 kg · 3-season
Dome 3P$319
Sleeps 3 · 2.4 kg · 3-season
Storm 2P$449
Sleeps 2 · 2.9 kg · 4-season
Ultra 1P$289
Sleeps 1 · 0.9 kg · 3-season
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
Check this part
On a phone, a website shows a tiny, zoomed-out desktop layout. What is the most likely cause?
Without width=device-width, mobile browsers render the page at about 980px wide and shrink it to fit the screen.
The site has a breakpoint at 1024px. Which widths are the best test values?
Boundary value analysis: test just below, at and just above the boundary. Off-by-one bugs live exactly there.
The viewport, breakpoints, mobile-first and fluid vs fixed layouts, plus a page you can resize yourself.
Part Not started
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.
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?
Check this part
What does WCAG reflow require?
At 320 CSS pixels (a 1280px window at 400% zoom), content must reflow without scrolling in two directions.
A wide table doesn't fit on a phone. What should happen?
Tables must never widen the whole page. They change to cards or scroll within their own box.
Layout and navigation, content, interaction, and the edges: 320px, landscape phones, zoom and very large screens.
Part Not started
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.
Found0/6
pxxl (≥ 1280)
64076810241280
base < 640sm ≥ 640md ≥ 768lg ≥ 1024xl ≥ 1280
200400600800100012001280
trailhead.example.com
Autumn Sale: up to 40% off · Free shipping over $75
Trailhead
Search gear…
Autumn collection
Sleep under a sky full of stars
Lightweight tents and packs for your next weekend in the mountains. Up to 40% off this week.
Bestsellers
Ridge 2P Tent
$249
Summit 35L Pack
$139
Trail Runner GTX
$165
Lumen 400 Headlamp
$45
Ember Stove
$79
Baseplate Compass
$29
Alpine Day Pack
$89
Dome 3P Tent
$319
Compare tents
Model
Sleeps
Weight
Season
Price
Ridge 2P
2
1.6 kg
3-season
$249
Dome 3P
3
2.4 kg
3-season
$319
Storm 2P
2
2.9 kg
4-season
$449
Ultra 1P
1
0.9 kg
3-season
$289
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.
At exactly 768px there is no navigation at all
At 767px you get the hamburger and at 769px the desktop links, but at 768px you get neither. The developer used > 768 for the links and < 768 for the hamburger. Expected: exactly one navigation at every width. A classic off-by-one error at a boundary, and 768px is a real iPad width.
2
Hint: Pick a phone width and scroll down to "Compare tents".
Tent table makes the whole page scroll sideways on phones
The table has a fixed minimum width of 600px, so below 640px it pushes the page wider than the viewport. The Price column is cut off, and the whole page, header included, scrolls horizontally. Expected: no horizontal page scroll; the table turns into cards or scrolls inside its own container.
3
Hint: Choose the iPad Air preset, switch the input to Touch and try to open Categories.
"Categories" menu can't be opened on touch devices
The menu only opens on mouse hover. Tablets wide enough for the desktop nav have no hover, and tapping does nothing (it's not even a button, so keyboard users can't open it either). Expected: the menu opens on tap/click and with the keyboard.
4
Hint: Drag the slider slowly between 850 and 1050px and watch the big headline.
Hero text overlaps the image between 900 and 999px
In this range the hero text box has a fixed width of 600px while the image takes the right half of the screen, so the headline and button run over the image. At 899px and at 1000px it looks fine, so testing only device presets misses it. Expected: text and image never overlap at any width.
5
Hint: At 360 or 393px, look for the "Shop the sale" button without scrolling. Then scroll down.
On small phones the main button is pushed below the fold
A tall sticky promo banner plus the sticky header take more than a third of the screen, so the main call to action starts below the visible area. While scrolling, the banner keeps covering content and can't be closed. Expected: the main button is visible on load; banners are short, closable and not sticky on small screens.
6
Hint: Compare the product pictures at iPad Air width and at Laptop or Desktop width.
Product images are stretched on wide screens
From 1280px the image boxes get a fixed height of 120px while their width keeps growing, and the images don't keep their aspect ratio, so the tent and backpack look squashed and wide. Expected: images keep their proportions (for example with aspect-ratio or object-fit: cover).
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.
Check this part
At exactly one width, often 768 or 1024px, the menu disappears. Which bug is this?
A gap at a breakpoint is rated High: users can lose the navigation completely.
Why is a hover-only dropdown a High severity bug?
Touch screens have no hover, so the menu is unusable there.
The responsive bugs you'll meet most often, and a shop with six of them to find with the resizer.
Part ProNot started
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.