A page can look polished on your 27-inch monitor and fall apart on a phone: a navigation bar that wraps into three lines, a table that forces sideways scrolling, a hero image that pushes the headline below the fold. Your visitors use every screen size in between, and most of them never see the version you designed on.
This guide explains how responsive layouts work, which widths are worth testing, how to check several sizes at once from your desktop, and what a width-based preview cannot tell you so you know when to reach for a real device.
How responsive design works
A responsive page adapts its layout to the available width. Three ingredients make that happen.
The viewport meta tag
Without it, mobile browsers pretend to be roughly 980 pixels wide and zoom the page out. With it, the page uses the device's real CSS width:
<meta name="viewport" content="width=device-width, initial-scale=1">
Flexible layouts
Percentages, fr units in CSS grid, flexbox wrapping and max-width: 100% on images let content adjust between breakpoints instead of jumping.
Media queries
Media queries apply different CSS above or below certain widths:
.product-grid {
display: grid;
grid-template-columns: 1fr;
gap: 16px;
}
@media (min-width: 768px) {
.product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
.product-grid { grid-template-columns: repeat(4, 1fr); }
}
The widths where layout changes are called breakpoints. They should be chosen where your content starts to look wrong, not to match specific device models.
Which sizes to test
Screen sizes are measured in CSS pixels, not physical pixels. A phone with a high-density screen may have over 1,000 physical pixels across but report a CSS width of around 360 to 430. A useful test set covers the ranges rather than every device:
| Range | Typical CSS width | What to look for |
|---|---|---|
| Small phone | 360 to 375 | Text wrapping, tap target size, horizontal overflow |
| Large phone | 390 to 430 | Hero images, sticky headers taking too much space |
| Tablet portrait | 768 to 834 | Two-column layouts that are too cramped |
| Tablet landscape / small laptop | 1024 to 1366 | Navigation switching between mobile and desktop |
| Desktop | 1440 to 1920 | Line length, content stretching too wide |
Also test the awkward in-between widths. Many bugs appear at 800 or 1100 pixels, just before a breakpoint kicks in.
Test several sizes at once
Our Responsive Design Tester loads a URL into several device-sized frames side by side.
- Open the Responsive Design Tester.
- Enter your page address, for example
https://www.example.com, and click Test URL. If you leave outhttps://, it is added for you. - By default, four frames appear: iPhone SE (375×667), iPad Mini (768×1024), Laptop (1366×768) and Desktop HD (1920×1080). Click the device chips to show or hide others, including iPhone 15, Pixel 8, Galaxy S23, iPad Air, iPad Pro 12.9 and MacBook Air.
- To test a specific width, type a Width and Height (200 to 3840 pixels) and click Add size. Custom sizes can be removed with the small cross next to them.
- Click Portrait to switch every frame to Landscape, and back.
- Use Zoom (25% to 100%) to fit large frames on your screen. At 50%, a 1920-pixel desktop frame takes 960 pixels of your screen.
- After changing your site, click the reload button next to Test URL to refresh all frames at once.
Each frame loads the real page from its own server, so you can scroll, click links and open menus inside it.
What a device frame cannot show
A frame changes the viewport width and height. That covers most layout testing, but not everything:
- User-agent detection: sites that serve a different mobile page based on the browser's identity string will still see a desktop browser.
- Touch behaviour: hover menus, swipe gestures and tap target sizes feel different with a finger.
- Device pixel ratio: images may look sharper or softer on a real high-density screen.
- Browser chrome: real mobile browsers have address bars that appear and disappear, changing the visible height.
- Performance: a desktop computer renders far faster than a budget phone on a mobile network.
Use frames for fast layout checks across many widths, then confirm key pages on at least one real phone. For speed, run the Page Speed Test; for a mobile usability check, use the Mobile Friendly Test.
Other ways to test responsiveness
Browser developer tools
Every major desktop browser has a device mode. In Chrome and Edge, press F12 and then Ctrl+Shift+M (Cmd+Shift+M on Mac). You can pick a device, drag to any width, throttle the network and emulate touch. It shows one size at a time but gives you full debugging, which makes it the best tool for fixing a problem once you have found it.
Resizing the window
Slowly dragging the browser window narrower is surprisingly effective for spotting the exact width where something breaks.
Real devices and cloud device labs
Nothing beats real hardware for touch, fonts and performance. Paid cloud services give remote access to many real devices when you need wide coverage.
Troubleshooting
A frame stays blank or shows an error
Many sites, including large platforms and banks, send an X-Frame-Options or Content-Security-Policy: frame-ancestors header that forbids being displayed in a frame. That is a security setting of the site, not a fault in the tester. Test your own site or a staging URL, or use developer tools for sites you do not control.
http:// addresses do not load
Browsers block insecure http:// pages inside a secure https:// page. Use the https:// version of your site. localhost addresses are an exception in most browsers.
The mobile frame shows a shrunken desktop page
Your page is missing the viewport meta tag. Add it to the <head>; the Meta Tag Generator can produce a complete set of head tags.
Something overflows horizontally
Look for fixed widths in pixels, long unbroken words or URLs, wide tables and images without max-width: 100%. For quick experiments with a fix, paste a copy of the problem markup into the HTML Viewer and switch it to phone width.
Frequently asked questions
What is the most common mobile screen width?
Most modern phones report CSS widths between about 360 and 430 pixels. Testing at 375 and around 412 covers the majority of layouts.
Why do some websites not load in the tester?
They forbid framing with security headers. This protects against clickjacking and cannot be bypassed from a web page.
Does the tester show the mobile version of sites that detect phones?
No. Frames change only the viewport size. Sites that choose a layout from the user-agent string will serve their desktop version.
Can I test a site on my own computer?
Yes, if it is served over localhost. Enter the local address, such as http://localhost:3000, and it loads in the frames like any other page.
How many breakpoints should a site have?
As many as the content needs. Many sites work well with two or three, for example around tablet and desktop widths, plus fluid layouts in between.