Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Horizontal scroll on mobile: find and fix wide content

PRF-154High impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

The viewport is the visible area of the browser on a phone. If the page content is wider than that area, the browser lets people scroll sideways. You see it as a page that wobbles left and right, a strip of empty space on the right, or a layout that looks zoomed out.

Technically, the document's scrollWidth is larger than its clientWidth. One element is usually to blame: a fixed-width image, banner, table, embedded form or video, a 100vw section, or a long unbroken string such as a URL.

Why it costs you leads or sales

Sideways scrolling makes a page feel broken. Visitors may not see the full form, a submit button can sit off screen, and the page can jump as they scroll. Many people leave rather than work out what is wrong. Because most ad and social traffic is on phones, this hits paid campaigns directly.

How a wide element loses the lead
  1. Ad click on phoneVisitor lands on the page
  2. Page loads wider than screenA fixed-width element overflows
  3. Visitor drags sidewaysLayout shifts and the button is off screen
  4. Form submittedNever reached

One oversized element pushes the layout past the screen edge and the steps after it are lost.

Content pushed out of view

The call to action exists but the visitor cannot comfortably reach it.

How to check if your site has it

Find the overflow in about five minutes
  1. Open the page in mobile view

    In Chrome, press F12, then the device toolbar icon (Ctrl+Shift+M, or Cmd+Shift+M on Mac). Pick a phone such as 375 px wide.

  2. Look for a sideways scrollbar

    If the page scrolls left and right, or empty space shows on the right, it overflows.

  3. Measure it in the console

    Run the snippet below. If scrollWidth is bigger than clientWidth, the page is too wide.

  4. List the offending elements

    Run the second snippet to log every element that extends past the right edge of the screen.

  5. Test several pages and widths

    Check the landing page, form page, checkout and thank-you page at 320, 375 and 414 px. Also test on a real phone, since emulators miss some cases.

Is the page wider than the screen?javascript
const d = document.documentElement;
console.log('scrollWidth', d.scrollWidth, 'clientWidth', d.clientWidth, d.scrollWidth > d.clientWidth ? 'OVERFLOW' : 'ok');
List elements that stick out on the rightjavascript
const w = document.documentElement.clientWidth;
[...document.querySelectorAll('body *')].forEach(el => {
  const r = el.getBoundingClientRect();
  if (r.right > w + 1) console.log(Math.round(r.right), el);
});

How to fix it

Fix the element that overflows. The usual causes are below.

Common causes and fixes
CauseFix
Image or video with fixed widthUse max-width: 100%; height: auto;
Section set to width: 100vwUse width: 100%; 100vw includes the scrollbar and can overflow
Fixed pixel widths (for example 600px)Use max-width with width: 100%
Wide table or code blockWrap it in a container with overflow-x: auto
Long URL or wordAdd overflow-wrap: anywhere
Embedded iframe formSet width: 100% and max-width: 100%
Negative margins or off-canvas elementsContain them in a parent with overflow: hidden or overflow: clip
Safe defaults for responsive contentcss
img, video, iframe, svg { max-width: 100%; height: auto; }
.table-wrap { overflow-x: auto; }
.content { overflow-wrap: anywhere; }
.hero { width: 100%; /* not 100vw */ }
Fix by platform
  1. Identify the element

    Use the console snippet to find the class of the wide element, then check whether it comes from the theme, a page builder block or a plugin.

  2. Override with CSS

    Add the fix under Appearance > Customize > Additional CSS (or in a child theme) rather than editing theme files.

  3. Check builder widths

    In Elementor, Divi or the block editor, look for fixed pixel widths or full-width sections with negative margins and set mobile values.

Before and after

Overflowing

  • Page drags sideways
  • Form edge cut off
  • Banner set to 100vw or 640px

Fixed

  • Page fits the screen
  • Form fully visible
  • Elements use 100% and max-width

How to confirm it's fixed

Confirmation checks
  • The console snippet shows scrollWidth equal to clientWidth
  • No sideways scrolling at 320, 375 and 414 px
  • The form and main button are fully visible
  • Checked on a real iPhone and a real Android phone
  • Landing, form, checkout and thank-you pages all tested

How to prevent it happening again

Overflow usually returns when someone adds a new banner, embed, table or plugin. Build the habit of a phone check before publishing.

Prevention habits
  • Add the safe CSS defaults to your global stylesheet
  • Preview every new page at 320 px before it goes live
  • Re-test after theme, plugin or page builder updates
  • Avoid fixed pixel widths and 100vw on layout blocks
  • Wrap tables and code blocks in scrollable containers

How FunnelGuard handles this

FunnelGuard does not check for horizontal scroll or content wider than the viewport today. It is a possible future check. We only measure page width in snapshots, so you should not rely on FunnelGuard for this issue.

What FunnelGuard does do is run your real journeys (lead forms, checkouts, booking and chat buttons) on a schedule and check each step. If a layout problem stops the journey from completing, for example a button that cannot be reached, the failed step is re-checked from a second region, and you get one alert with a screenshot and a likely cause. It also checks tracking hits and whether test leads reach your inbox and CRM.

To watch for horizontal scroll yourself, re-run the console snippet after each site change, test on real phones, and use Chrome DevTools device mode or a browser testing tool on key pages. The free read-only FunnelGuard audit and the Free plan (1 site, 2 journeys, daily checks, no card) can cover the journey side.

Questions people ask

Why does my website scroll sideways on mobile?

One element is wider than the phone screen, so the browser lets you scroll to see it. Common culprits are fixed-width images, sections set to 100vw, wide tables, embeds and long unbroken text. Find it with DevTools and give it a width that fits.

How do I find which element is causing horizontal scroll?

Open Chrome DevTools in mobile view and run a script that lists elements whose right edge is past the document's clientWidth. You can also delete elements one at a time in the Elements panel until the sideways scroll disappears.

Does overflow-x: hidden fix horizontal scroll?

It hides the scroll but does not fix the cause, so content can still be cut off. It can also break sticky elements. Fix the wide element first, and use overflow-x: hidden only as a last resort.

Why does 100vw cause horizontal scroll?

100vw is the full viewport width including the vertical scrollbar, where one is shown. A block set to 100vw can therefore be slightly wider than the usable area. Use width: 100% instead.

Can horizontal scroll hurt my ad conversion rate?

Yes, it can. A page that wobbles sideways looks broken and can push forms or buttons out of view on phones, where most ad traffic arrives. The size of the effect depends on your page and audience.

How do I fix a table that is too wide on mobile?

Wrap the table in a container with overflow-x: auto so only the table scrolls, not the page. You can also make columns stack on small screens with CSS.

Does FunnelGuard detect horizontal scroll on mobile?

No. FunnelGuard does not check for this today, though it is a possible future check. It does run your real journeys on a schedule and alerts you if a step fails to complete.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.