moonlitdesign Posted March 19, 2022 Share Posted March 19, 2022 Site URL: http://www.moonlitdesign.uk so i'm having this on going issue where i can't use html, body {overflow-x: hidden;} on the whole site as it is breaking the scroll on mobile. I know this isn't good practice either. so i thought i could try and localise the code to just the images instead but its not taking affect at all. can anyone see the problem here? .sqs-block-image .image-block-outer-wrapper .image-block-wrapper { position: relative; overflow-x: hidden; } I'm in 7.1! i need to hide the overflow on mobile as it is ruining the experience! elenadesign 1 Link to comment
sarahhalliday Posted October 20, 2022 Share Posted October 20, 2022 (edited) I'm having the same problem! There is random white space down the side of my site but: html, body {overflow-x:hidden;} breaks scrolling. https://kanga-suit.squarespace.com/ PW: KangarooCare 😞 Please help! Edited October 20, 2022 by sarahhalliday needed more info Link to comment
tuanphan Posted October 23, 2022 Share Posted October 23, 2022 On 10/20/2022 at 10:41 PM, sarahhalliday said: I'm having the same problem! There is random white space down the side of my site but: html, body {overflow-x:hidden;} breaks scrolling. https://kanga-suit.squarespace.com/ PW: KangarooCare 😞 Please help! Use this new code body { overflow-x: hidden; } kellyhutsbydesigns and sarahhalliday 1 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
sarahhalliday Posted October 24, 2022 Share Posted October 24, 2022 @tuanphan Yeessss! That worked! Thank you Tuanphan, you are a genius! Best, Sarah Link to comment
tinymachine Posted September 1, 2023 Share Posted September 1, 2023 Just in case anyone else gets here with the same problemI think I found a fix that doesn't break things. Instead of: overflow-x: hidden; Try this: overflow-x: clip; It sounds so simple and like it shouldn't be that much different, but for some reason `overflow-x: hidden` broke my layout after working for years (Brine Template). It seems to be making scroll behavior sticky, but setting overflow-x to "clip" seems to solve this. Link to comment
kellyhutsbydesigns Posted November 20, 2023 Share Posted November 20, 2023 Just to throw in some more background on this in case it's useful to anyone with the same issue. I had a problem with my client's site's header menu. It would disappear on some browsers and cover the top of the overlay menu with a white bar on others, plus general juddering and scrolling issues. All on mobile. After painstakingly removing hundreds of lines of code line-by-line, it did indeed turn out to be the line: html, body {overflow-x:hidden;} and as @tuanphan suggested, changing it to body {overflow-x:hidden;} was the fix. I'd really like to understand from any of the experts on here why that code no longer works? I must have had it in use for three years+ with no issue before (I don't even know why it was there but clearly I had some horizontal overflow at some point that necessitated adding that!). Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment