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.
- Ad click on phoneVisitor lands on the page
- Page loads wider than screenA fixed-width element overflows
- Visitor drags sidewaysLayout shifts and the button is off screen
- Form submittedNever reached
One oversized element pushes the layout past the screen edge and the steps after it are lost.
The call to action exists but the visitor cannot comfortably reach it.
How to check if your site has it
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.
Look for a sideways scrollbar
If the page scrolls left and right, or empty space shows on the right, it overflows.
Measure it in the console
Run the snippet below. If scrollWidth is bigger than clientWidth, the page is too wide.
List the offending elements
Run the second snippet to log every element that extends past the right edge of the screen.
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.
const d = document.documentElement;
console.log('scrollWidth', d.scrollWidth, 'clientWidth', d.clientWidth, d.scrollWidth > d.clientWidth ? 'OVERFLOW' : 'ok');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.
| Cause | Fix |
|---|---|
| Image or video with fixed width | Use max-width: 100%; height: auto; |
Section set to width: 100vw | Use 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 block | Wrap it in a container with overflow-x: auto |
| Long URL or word | Add overflow-wrap: anywhere |
| Embedded iframe form | Set width: 100% and max-width: 100% |
| Negative margins or off-canvas elements | Contain them in a parent with overflow: hidden or overflow: clip |
img, video, iframe, svg { max-width: 100%; height: auto; }
.table-wrap { overflow-x: auto; }
.content { overflow-wrap: anywhere; }
.hero { width: 100%; /* not 100vw */ }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.
Override with CSS
Add the fix under Appearance > Customize > Additional CSS (or in a child theme) rather than editing theme files.
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.
Find the section
Use the console to find which section or app block is wide.
Edit the theme CSS
In Online Store > Themes > Edit code, add the fix to the theme's main CSS file, or use the section's custom CSS setting where your theme has one.
Check apps and embeds
Disable app blocks one by one in the theme editor to see if one causes the overflow.
Switch breakpoints
In the Designer, switch to Mobile portrait and select elements until the one extending past the canvas is found.
Replace fixed widths
Set width to 100% or Auto and use max-width instead of fixed pixels. Check embeds, which do not scale on their own.
Open the mobile editor
Switch to mobile view in the editor and look for elements that extend beyond the page edge.
Resize or move them
Drag the element inside the page margins. Check HTML embeds and custom code elements, which have their own widths.
Find the block
Use the console on the published page to find the wide block, often a code block, an embed or a gallery.
Add CSS
Add the fix in Website > Website Tools > Custom CSS (the menu name varies by version).
Check custom elements
In the funnel or website builder, look at custom code, embedded forms and calendars set to fixed widths.
Set widths to 100%
Use percentage widths, check the mobile preview, and add a small CSS fix in the page's custom CSS settings.
Check injected elements
Banners, popups or widgets injected by Custom HTML tags can overflow. Preview the container and add max-width: 100% to injected markup.
Confirm the viewport tag
Make sure the head contains <meta name="viewport" content="width=device-width, initial-scale=1">.
Fix the offending rule
Replace fixed widths with max-width and percentages, and avoid 100vw on full-width blocks.
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
- 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.
- 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.
Related issues
- PRF-173Tables overflow on mobileFix guide
- PRF-174Images overflow container on mobileFix guide
- PRF-160Missing viewport meta tag (desktop page shrunk on phones)Fix guide
- PRF-177Layout broken on small phones (320-360 px)Fix guide
- PRF-176Layout broken on tablet widths (768-1024 px)Fix guide
- PRF-175Layout broken in landscape orientationFix guide