Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
TroubleshootingNovember 22, 20265 min read

Layout broken on mobile

Mobile layouts break when something is wider than the screen, when desktop columns never collapse, or when full-height sections meet the phone's browser bars.

Startbase Team
Editorial ink illustration of a folding carpenter's ruler bent so it does not fit a narrow drawer, the brass hinge in ember orange

Key takeaways

  • Sideways scrolling means one element is wider than the screen. Find it, then give it a max width or let it wrap.
  • Build the phone layout first and add columns at larger breakpoints, rather than squeezing a desktop layout down.
  • Full-height sections and bottom bars misbehave on phones because the browser bars come and go. Use dynamic viewport units and safe-area insets.

If your site looks right on a laptop but breaks on a phone, the most common cause is one element that is wider than the screen: a fixed-width box, a big image, a table or a long unbroken word. It forces the whole page to scroll sideways and makes everything look zoomed out or cut off. The second most common cause is a desktop layout (three columns, a sidebar) that never collapses to a single column at small widths.

See the problem properly first

In Startbase, the Preview tab can switch between Desktop, Tablet and Phone views, which catches most layout bugs while you build. Also check on a real phone at least once: real phones add browser bars that slide in and out, a notch or Dynamic Island, a home indicator, and an on-screen keyboard, none of which a resized window has. Test at a narrow width too; 360 pixels wide is a sensible minimum, since many Android phones and small iPhones sit close to it. And turn the phone sideways once: landscape gives you a very short, wide screen where full-height sections, fixed headers and modals most often run out of room.

The causes, most likely first

1. Something is wider than the screen

How to check: in a desktop browser's device mode, scroll sideways and look for what sticks out. A faster trick in the developer console: temporarily add a red outline to every element (`* { outline: 1px solid red }`) and the overflowing box is obvious. Common offenders: an element with `width: 600px`, an image without `max-width: 100%`, a data table, a code block, a long URL or email address, and decorative shapes positioned partly off-screen.

The fix: replace fixed widths with `max-width` and percentages, give images `max-width: 100%; height: auto`, wrap wide tables in a container that scrolls horizontally on its own, and allow long words to break (`overflow-wrap: anywhere`). Hiding the overflow on the whole page (`overflow-x: hidden` on body) hides the symptom but can break sticky headers; fix the element instead.

2. Desktop columns that never collapse

A three-column grid of cards becomes three 110-pixel slivers on a phone. How to check: the content is squashed rather than overflowing. The fix: start with one column and add more at larger widths. Startbase websites use Tailwind CSS, whose default breakpoints are 640 pixels (`sm`), 768 (`md`) and 1024 (`lg`); a pattern like `grid-cols-1 md:grid-cols-2 lg:grid-cols-3` means one column on phones, two on tablets, three on laptops. Our guide to responsive design explains mobile-first thinking in more depth.

3. Full-height sections and the jumping browser bar

A hero set to `height: 100vh` is taller than the visible screen on mobile Safari and Chrome, because `vh` is measured as if the browser bars were hidden. The bottom of the section, often with its button, sits under the toolbar. The fix: use the newer dynamic viewport unit `100dvh` (or `min-height` with `svh` for "the smallest visible height"), which accounts for the bars. Prefer `min-height` over `height` so content can grow if text wraps.

4. Bottom bars under the home indicator or the keyboard

Fixed bottom navigation can sit underneath the iPhone home indicator, or get pushed around when the keyboard opens. The fix: add padding with `env(safe-area-inset-bottom)` (with `viewport-fit=cover` in the viewport meta tag), and on screens with forms, avoid fixed bottom elements or hide them while an input is focused.

5. Text too small or zoom on input focus

On iPhone, tapping a form field with a font size under 16 pixels makes Safari zoom in, which feels like the layout broke. The fix: 16 pixels minimum for inputs. Body text below about 16 pixels is also hard to read on phones. Disabling zoom in the viewport tag is not the fix; it hurts people who need to zoom.

6. Headings and buttons sized in fixed pixels

A 72-pixel hero headline that looks bold on a laptop becomes three lines of two words each on a phone, or overflows when one word is long ("Internationalization" will not wrap). Buttons with fixed widths cut off their labels, especially once the app is translated into a language with longer words. The fix: scale big type with the screen using `clamp()` (for example `font-size: clamp(2rem, 6vw, 4.5rem)`), let buttons size to their label with padding instead of a fixed width, and allow button rows to wrap onto two lines on narrow screens.

7. Hover-only interactions

Menus that open on hover, tooltips with essential information, and buttons that only appear when you hover a card simply do not exist on a touch screen. The fix: make every hover interaction work with a tap, and never hide essential actions behind hover.

8. A missing viewport meta tag

Without `<meta name="viewport" content="width=device-width, initial-scale=1">`, phones render the page as if it were about 980 pixels wide and shrink it, so everything looks tiny. Startbase website templates include it, but pages added by hand, or exported HTML pasted in, may not. How to check: the whole page looks like a miniature desktop site. The fix: add the tag to the HTML head.

Show, don't describe

Layout bugs are much easier to fix from a picture than from a description. The Startbase docs recommend attaching a screenshot directly in chat, or using Visual edit to select the exact element and describe the change ("center this vertically and increase padding to 24px"). You can also draw on the preview to mark what is wrong and send the annotated screenshot. A screenshot from your actual phone beats a description every time. Name the phone and browser too, since Safari and Chrome on Android differ in exactly the places that break most (toolbars, safe areas, input zoom). And fix one screen at a time: a single "make everything mobile friendly" request touches every page at once and is harder to check.

The message to send the agent

On phones (tested on an iPhone 13 and at 360 px in the Phone view), the home page scrolls sideways and the pricing cards are squashed into three thin columns. The hero's "Get started" button is hidden behind Safari's bottom toolbar, and the fixed bottom nav overlaps the home indicator. Screenshot attached. Please: find and fix whatever is wider than the screen (no overflow-x hidden on body), make the pricing cards one column on phones and three from lg up, change the hero to min-height 100dvh, add safe-area padding to the bottom nav, set form inputs to at least 16px, and check every page at 360 px, 768 px and 1280 px afterward.

If the whole design feels cramped rather than broken, how to design an app without a designer is a good next read. The preview docs cover device views, annotations and Visual edit.

Frequently asked questions

Why does my website scroll sideways on mobile?

One element is wider than the screen: a fixed width, an image without max-width, a table, or a long unbroken word. Find it with an outline on every element and constrain it.

Why is my 100vh section too tall on iPhone?

Mobile browsers measure vh as if their toolbars were hidden. Use 100dvh or min-height with svh so the section fits the visible screen.

What screen widths should I test?

As a starting set: 360 px for small phones, 390 to 430 px for common phones, 768 px for tablets and 1280 px for laptops.

Why does my page zoom in when I tap a form field?

iPhone Safari zooms into inputs with a font size under 16 px. Set inputs to 16 px or larger.

On this page

  • See the problem properly first
  • The causes, most likely first
  • Show, don't describe
  • The message to send the agent

Keep reading

More in Troubleshooting
Editorial ink illustration of an overstuffed card catalog drawer spilling index cards, the brass tab of one card in ember orange
TroubleshootingNovember 22, 2026

Why is my app slow with lots of data?

An app that slows down as data grows almost always loads or draws too much at once. Here is how to find which part is slow and the fix for each.

6 min read
Editorial ink illustration of a border checkpoint with a lowered barrier arm and a waiting parcel, the guard's stamp in ember orange
TroubleshootingNovember 22, 2026

CORS errors explained and fixed

A CORS error means the server you called did not say your website is allowed to read its answer. The fix lives on that server, or in a server function you control.

5 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.