How to fix content wider than screen
"Content wider than screen" means one or more elements on your page are wider than a phone display, so visitors have to scroll sideways. Find the element that sticks out and make it fit the screen width, usually with a small CSS change or a setting in your page builder.
Content wider than screen is a mobile usability problem. Something on the page, such as an image, table, video, button row or block of text, is wider than the phone it is shown on. The page then scrolls left and right, or the browser shrinks everything to fit and the text becomes tiny. It is almost always caused by one or two elements, not the whole site.
What people see
On a phone, visitors might notice any of these:
- The page wiggles sideways when they scroll up and down.
- There is a blank strip on the right side of the page.
- The whole page looks zoomed out, with text too small to read.
- A menu, button or price table is cut off at the screen edge.
Most visitors will not work out what is wrong. They just decide the site is awkward and leave.
Why it matters
Most web visits happen on phones, and Google mostly judges pages by their mobile version. A page that does not fit the screen is harder to read, harder to tap and harder to buy from. That costs you trust and sales: someone who cannot see the Add to basket button or the full phone number will not look for a workaround. It can also hurt how your page performs in search, because a poor mobile experience can put visitors off and Google mostly assesses the mobile version of your pages.
How to check if your site has it
You can test for free in a few minutes.
- Open your site on a real phone. Scroll down the page and try to drag it left and right. If it moves sideways, you have the problem.
- On a computer, open your page in Chrome, right click and choose Inspect, then click the small phone and tablet icon (device toolbar). Choose a phone size such as 375 pixels wide and look for a horizontal scroll bar at the bottom.
- To find the culprit, open the Console tab in the same panel and paste this. It lists every element that reaches past the right edge of the screen:
document.querySelectorAll('*').forEach(function (el) {
if (el.getBoundingClientRect().right > document.documentElement.clientWidth) console.log(el);
});
Hover over each item printed in the console and Chrome highlights it on the page. Often it is a single image, table or embed.
If you would rather not do this by hand, the mobile usability test in week 5 of SiteMonday checks your site on a phone-sized screen and lists problems like this in the written report and ranked fix list.
How to fix it
The fix depends on what is sticking out. These are the common causes:
| Cause | What to do |
|---|---|
| Missing viewport tag | Add the viewport meta tag to the page head (see below) |
| Fixed pixel widths on sections or columns | Replace widths like width: 1200px with max-width: 100% or percentages |
| Large images | Let images shrink with max-width: 100% and height: auto |
| Wide tables | Wrap the table in a container with overflow-x: auto so only the table scrolls |
| Videos and embedded maps (iframes) | Set max-width: 100%, or use your editor's responsive embed option |
| Long links or words with no spaces | Add overflow-wrap: anywhere to the text |
Elements set to 100vw | Use 100% instead, because 100vw can include the scrollbar width |
First, check that your page head contains this line. Without it, phones pretend to be a wide desktop screen:
<meta name="viewport" content="width=device-width, initial-scale=1">
Then add a safety rule for media in your stylesheet:
img, video, iframe {
max-width: 100%;
height: auto;
}
If the whole layout is built with fixed widths, a few rules will not be enough and the layout needs to be made flexible. Our guide to fixed width layouts explains this, and the guide to images overflowing on mobile covers the most common single cause.
A word of warning about overflow-x: hidden on the body. It is a popular quick fix and it does remove the sideways scroll, but it only hides the symptom. The wide element is still there and may be cut off, so visitors lose part of your content. Use it only as a last resort.
Fixing it on common platforms
Menu names vary between versions and themes, so treat these as pointers.
- WordPress: the cause is usually the theme, a page builder section or a plugin that outputs a fixed width. Try switching to a default theme briefly to see if the problem disappears, but do this on a staging copy or after taking a full backup, because switching themes on a live site can change or break your layout and settings. Extra CSS usually lives under Appearance, then Customize, depending on your theme. See the WordPress guide for details.
- Elementor, WooCommerce, Shopify, Wix, Squarespace, Webflow: look for a section, column, image or custom code block with a fixed pixel width, and check your mobile preview mode. Each platform has its own guide under the content wider than screen help pages.
- Custom sites: your developer should look for fixed widths, missing viewport tags and wide embeds in the stylesheet.
In page builders, switch the editor to mobile view and look for elements that go past the edge. Pasted embed codes and custom HTML blocks are the usual suspects, because they often carry fixed widths.
How to confirm the fix worked
- Reload the page on a real phone (clear the cache or use a private tab) and try to drag it sideways. It should stay still.
- Repeat the Chrome device toolbar test at several widths, for example 320, 375 and 414 pixels.
- Run the console snippet again. It should print nothing, or only items that are hidden on purpose.
- Check the other important pages too: home page, contact page, a product or service page and the checkout. The problem often appears on only one template.
How to stop it coming back
- Always preview new pages in mobile view before publishing.
- Avoid pasting embed codes with fixed widths. Choose responsive embed options where they exist.
- Compress and size images sensibly, and keep the
max-width: 100%rule in place. - Retest after theme updates, plugin updates and redesigns, since these are when the problem tends to return.
- Check on a real phone from time to time. A recurring review helps: SiteMonday repeats its checks through the year, so changes made after week 5 can still be caught by other weekly reports. Finding and explaining problems is what it does, while the fixing is up to you or your developer.
If you also see text boxes that are hard to use or buttons that are tricky to press on your phone, those are separate but related issues, so check the guide to tap targets that are too small as well.
Step by step for your platform
- Content wider than screen on WordPress
- Content wider than screen on Shopify
- Content wider than screen on Wix
- Content wider than screen on Squarespace
- Content wider than screen on Webflow
- Content wider than screen on Elementor
- Content wider than screen on WooCommerce
Questions
What does content wider than screen mean?
It means at least one element on the page is wider than the phone's screen, so the page scrolls sideways or looks zoomed out. The cause is usually a fixed width, a large image, a wide table or an embed.
Is content wider than screen bad for SEO?
It can be. It makes the mobile page harder to use, and Google mostly looks at the mobile version of pages. Visitors who leave quickly also cost you enquiries and sales.
Can I fix it by adding overflow-x: hidden?
It removes the sideways scrolling, but the wide element is still there and part of it may be cut off. Treat it as a last resort and find the element that is too wide instead.
Why does it only happen on some pages?
Usually one page contains something the others do not, such as a wide table, an embedded video or a pasted block of custom code. Check the elements unique to that page.
Do I need a developer to fix it?
Not always. Many cases are one image, table or embed that you can resize in your page editor. If the whole layout uses fixed widths, a developer will save you time.
How do I know which element is causing it?
Open the page in Chrome's device toolbar at phone width, then run a short console script that lists elements reaching past the screen edge. Hovering over each item highlights it on the page.