How to Fix Content Wider Than Viewport on Mobile
errorThe Problem
Some elements on your page are wider than the mobile screen, causing horizontal scrolling. This creates a poor user experience and is flagged by Google as a mobile usability issue. Common causes: wide tables, large images without max-width, fixed-width elements, and iframes.
trending_upWhy It Matters for SEO
Horizontal scrolling on mobile is one of the clearest signals of a page not designed for mobile. Users struggle to read content, miss CTAs that are off-screen, and leave frustrated. Google uses this as a direct mobile usability signal that affects rankings.
buildHow to Fix It
- 1
Open Chrome DevTools (F12) → toggle device toolbar → look for horizontal overflow.
- 2
Common Shopify culprits: product comparison tables, embedded iframes, custom HTML blocks, and wide images.
- 3
Add overflow-x: hidden to the body (quick fix) or properly constrain wide elements (better fix).
- 4
Add the CSS below to your theme's stylesheet.
- 5
Check on multiple screen sizes after applying the fix.
/* Add to assets/base.css */
html, body {
overflow-x: hidden;
max-width: 100vw;
}
img {
max-width: 100%;
height: auto;
}
table {
max-width: 100%;
overflow-x: auto;
display: block;
}
iframe, embed, object, video {
max-width: 100%;
}Related Fix Guides
How to Fix a Missing Viewport Meta Tag on Shopify & WooCommerce
Fix the missing viewport meta tag on your store. Without it, your site looks broken on mobile devices. Copy-paste fix included.
How to Fix Tap Targets Too Small on Mobile
Fix small tap targets on your Shopify or WooCommerce mobile site. Make buttons and links finger-friendly for better UX and SEO.
How to Fix Font Size Too Small for Mobile Readability
Fix small text on mobile that forces users to zoom. Learn the minimum font sizes for mobile SEO and how to set them on Shopify and WooCommerce.
Want to check if YOUR store has this issue?
Scan your site for free — get copy-paste fixes in 60 seconds.
searchScan Now — It's Free