Claude Code mobile

Responsive Layout Breaks Below 375px Screen Width

Your application's layout breaks on very small screens (below 375px width), even though it looks fine on standard mobile sizes. Elements overflow horizontally, text gets cut off, buttons become untappable, and the page requires horizontal scrolling to use.

This affects users with older or smaller phones (iPhone SE, Galaxy A series), users who have increased their system font size, and users viewing your app in split-screen mode on tablets. These are real users who are completely locked out of your app.

Claude Code typically generates responsive CSS targeting common breakpoints (768px, 640px) but doesn't account for screens smaller than 375px, where fixed pixel widths, min-width declarations, and padding cause layout overflow.

Error Messages You Might See

Horizontal scroll appears on mobile Layout shifts when rotating device Elements overflow viewport boundary Touch targets too small (Lighthouse audit)
Horizontal scroll appears on mobileLayout shifts when rotating deviceElements overflow viewport boundaryTouch targets too small (Lighthouse audit)

Common Causes

  • min-width on containers — CSS rules like min-width: 375px or min-width: 320px prevent the layout from shrinking further
  • Fixed pixel widths — Elements have width: 360px or similar fixed values that can't adapt to smaller screens
  • Horizontal padding overflow — Container padding (e.g., px-8 / 32px on each side) consumes too much of the narrow viewport
  • Flexbox not wrapping — Row layouts with flex-nowrap force elements side by side when they should stack
  • Media queries start too high — The smallest breakpoint is 640px, with no styles for screens below that

How to Fix It

  1. Design mobile-first — Write base styles for the smallest screen, then add complexity with min-width media queries
  2. Replace fixed widths with percentages or max-width — Use width: 100% or max-width: 100% instead of pixel values
  3. Reduce padding on small screens — Use responsive padding like p-3 sm:p-6 to reduce spacing on narrow viewports
  4. Test at 320px width — Use Chrome DevTools responsive mode set to 320px to find overflow issues
  5. Add overflow-x: hidden cautiously — Only on the body element as a safety net, not as a fix for individual layout issues
  6. Use clamp() for font sizes — Replace fixed font sizes with clamp(14px, 4vw, 18px) for fluid typography

Real developers can help you.

Anthony Akpan Anthony Akpan Developer with 8 years of experience building softwares fro startups Victor Denisov Victor Denisov Developer Jaime Orts-Caroff Jaime Orts-Caroff I'm a Senior Android developer, open to work in various fields AUXLE AUXLE I am a Full Stack Developer experienced in building Websites, Web apps and Cross Platform Mobile Apps for Startups and Companies. Jared Hasson Jared Hasson Full time lead founding dev at a cyber security saas startup, with 10 yoe and a bachelor's in CS. Building & debugging software products is what I've spent my time on for forever Tejas Chokhawala Tejas Chokhawala Full-stack engineer with 5 years experience building production web apps using React, Next.js and TypeScript. Focused on performance, clean architecture and shipping fast. Experienced with Supabase/Postgres backends, Stripe billing, and building AI-assisted developer tools. Antriksh Narang Antriksh Narang 5 years+ Experienced Dev (Specially in Web Development), can help in python, javascript, react, next.js and full stack web dev technologies. rayush33 rayush33 JavaScript (React.js, React Native, Node.js) Developer with demonstrated industry experience of 4+ years, actively looking for opportunities to hone my skills as well as help small-scale business owners with solutions to technical problems Simon A. Simon A. I'm a backend developer building APIs, emulators, and interactive game systems. Professionally, I've developed Java/Spring reporting solutions, managed relational and NoSQL databases, and implemented CI/CD workflows. BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

What is the smallest screen width I should support?

Design for 320px as the minimum. This covers iPhone SE, older Android phones, and split-screen tablet usage. Test at 320px during development to catch overflow issues early.

How do I find what's causing horizontal scroll?

In Chrome DevTools, add a temporary style: * { outline: 1px solid red; } to see every element's boundaries. The element extending beyond the viewport edge is your culprit.

Related Claude Code Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help