Devices with a 402px wide viewport
402px4 devices
4 devices give web pages a 402 CSS pixel wide viewport in portrait, with heights from 874 to 874px. If your layout fits 402px, it fits all of them.
| Device | CSS viewport | DPR | Physical pixels | Year |
|---|---|---|---|---|
| iPhone 18 Pro | 402×874 | 3 | 1206×2622 | 2026 |
| iPhone 17 Pro | 402×874 | 3 | 1206×2622 | 2025 |
| iPhone 17 | 402×874 | 3 | 1206×2622 | 2025 |
| iPhone 16 Pro | 402×874 | 3 | 1206×2622 | 2024 |
Check your site at 402px
Paste your address (or localhost:3000). doesitfit shows it on real screen sizes at once and tells you, bluntly, where it spills.
Free, no sign-up. Or ask Claude, ChatGPT or Codex to check it.
Designing for 402px
Breakpoints
Tailwind: base styles only (below sm, 640px). Bootstrap: xs.
Room for content
370px with 16px side padding, 354px with 24px. Anything fixed wider than 402px makes the page scroll sideways (fix it).
Sharp images
At DPR 3, a full-width image needs 1206px of real pixels.
Every height at this width
Nearby widths
Questions people ask
Which phones have a 402px wide viewport?
iPhone 18 Pro, iPhone 17 Pro, iPhone 17, iPhone 16 Pro.
Is 402px the screen resolution?
No. 402px is the width in CSS pixels, what web pages get. The screens have 3× as many physical pixels across (the device pixel ratio).
Which breakpoint applies at 402px?
Tailwind CSS: base styles only (below sm, 640px). Bootstrap: xs. Media queries use this CSS width, not the screen resolution.
Guides that help
- Responsive breakpoints in 2026 — the widths that matterWhere 123 real phones, tablets, laptops and monitors land in CSS pixels, which responsive breakpoints actually matter in 2026, and which screens to test.Guides · 8 min read
- How to fix horizontal scrolling on mobile (12 causes)Page wobbles sideways on phones? The 12 usual causes of horizontal scrolling on mobile, a fix for each, and a console snippet that finds the culprit fast.Fixes · 9 min read
- Text touching the screen edge? Mobile padding that worksText squashed against the edge of a phone screen looks broken. How much mobile padding to use (16–24px), CSS and Tailwind patterns that work, and a fix prompt.Fixes · 7 min read