I want to remove the horizontal scroll in the mobile version
pw: fds1
Hey @siva_fds ,
body,html {
overflow-x: hidden !important;
width: 100%;
}
You can try this code it might help you
Thank You!
Hello @siva_fds, that overflow-x:hidden trick just masks the scrollbar, it wonât fix whateverâs actually pushing past the edge. Open the page in DevTools mobile view and run this in the console, itâll log the exact element causing it: document.querySelectorAll(â*â).forEach(e=>{if(e.getBoundingClientRect().right>document.documentElement.clientWidth)console.log(e)}). On Stretch itâs usually a product-card hover image or a slideshow slide sitting outside its container, once you find it, fix that elementâs width/margin instead of hiding overflow globally (which can also break sticky headers).
If this helped, please mark it a solution ![]()
Hi @siva_fds
I checked the mobile version, but Iâm not seeing any horizontal scroll issue on my end. Could you please share a screenshot or let me know which page/section youâre seeing it on? Iâll check it again and fix it accordingly.
Best regards,
Devcoder ![]()
Hi @siva_fds,
Had a look at your preview link. Iâd avoid putting overflow-x: hidden on html and body. It hides the symptom rather than fixing it, and setting overflow on those two elements also breaks position: sticky further down the page, so if your header is sticky now or becomes sticky later, it will quietly stop working.
From what I can see the overflow is coming from the announcement bar section above the header, the one with the slider. Scoping it to that section is much safer:
.shopify-section--announcement-bar {
overflow-x: hidden;
}
You can add that in Theme settings > Custom CSS, no need to edit any theme files.
Worth confirming the class name in DevTools first, since it can differ between themes. And if youâd rather fix the cause than clip it, check the slider track inside that section, usually something in there has a fixed width or a negative margin that makes it wider than the viewport.
UPD: Sorry, I should have explained this properly the first time.
The overflow isnât the announcement bar itself, itâs the carousel arrows inside it. The theme gives .tap-area a ::before pseudo-element that acts as an enlarged tap target:
.tap-area::before {
content: ââ;
width: var(âtap-area-size);
height: var(âtap-area-size);
left: calc(50% - var(âtap-area-size) / 2);
position: absolute;
}
With --tap-area-size at 2.25rem it comes out 36x36, which is wider than the arrow button itself. The next button sits flush against the right edge of the viewport, so half of that invisible box hangs off the page and the browser gives you a horizontal scroll.
Good news is the pseudo-element has content: ââ and nothing visible in it, so clipping it costs you nothing on screen:
Hello @siva_fds, @HotspotStudioâs diagnosis is spot on - itâs the announcement barâs carousel arrow tap-area, not the header. One thing worth adding: test the fix on actual iOS Safari, not just DevToolsâ mobile emulator, since iOS is stricter about rubber-band bounce and can still show a hint of scroll on an overflow that Chromeâs emulator renders as fully clean. If you want the sticky-safe version everywhere, overflow-x: clip on that section works the same as hidden here without the risk of breaking position: sticky elsewhere on the page.
If this helped, please mark it a solution