What you’ll learn
You’ll use viewport presets and custom widths to find where a layout stops fitting.
Set the viewport policy
Put the viewport meta tag in a complete HTML document. Start with fluid widths and use widths tied to content rather than device model names.
Inspect the narrowest layout
Choose Mobile or enter 320px as a custom width. Try long labels, larger text and page zoom. Look for horizontal scrolling and clipped controls.
Test past the breakpoint
Compare widths immediately below and above a breakpoint. Check that reading order and keyboard focus still follow the DOM.
Try the code
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
main { display: grid; gap: 1rem; }
@media (min-width: 42rem) { main { grid-template-columns: 1fr 1fr; } }
article { overflow-wrap: anywhere; }
</style>
<main><article>Field notes</article><article>A very long project name</article></main>Open the editor and paste this sample into the HTML tab.
Troubleshooting
If columns refuse to shrink, inspect intrinsic content widths. Try minmax(0, 1fr), wrap unbroken text, and give media a max-width of 100%.
Frequently asked questions
Does a mobile-width iframe emulate a phone?
It checks width-dependent layout. Test real devices for mobile keyboards, touch, viewport chrome and device-specific behavior.