afabella Posted July 15, 2021 Share Posted July 15, 2021 Site URL: https://www.longevitycollective.com/newsletter I am trying to disable scrolling on desktop only on one page (I want to still be able to scroll on mobile). Here is the code I added to the header to disable scrolling: html, body {width: 100% !important; height: 100% !important; overflow: hidden !important} I've only been able to find posts about completely disabling desktop and mobile, or just mobile only. How can I fix this? Beyondspace 1 Link to comment
Beyondspace Posted July 16, 2021 Share Posted July 16, 2021 4 hours ago, afabella said: Site URL: https://www.longevitycollective.com/newsletter I am trying to disable scrolling on desktop only on one page (I want to still be able to scroll on mobile). Here is the code I added to the header to disable scrolling: html, body {width: 100% !important; height: 100% !important; overflow: hidden !important} I've only been able to find posts about completely disabling desktop and mobile, or just mobile only. How can I fix this? Use media query @media only screen and (max-width: 768px) { } BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
afabella Posted July 16, 2021 Author Share Posted July 16, 2021 I'm not sure if I used it properly. I used: @media only screen and (max-width: 768px) {width: 100% !important; height: 100% !important; overflow: hidden !important} Is this what you meant? If so, it still isn't working unfortunately. Link to comment
tuanphan Posted July 18, 2021 Share Posted July 18, 2021 @afabella I see it worked here. Or you mean remove scroll bar, not disable scroll? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
afabella Posted July 20, 2021 Author Share Posted July 20, 2021 @tuanphan I meant disable scroll (on desktop only, not mobile). The code didn't work for me unfortunately. Any other suggestions? Link to comment
Solution tuanphan Posted July 22, 2021 Solution Share Posted July 22, 2021 On 7/21/2021 at 2:52 AM, afabella said: @tuanphan I meant disable scroll (on desktop only, not mobile). The code didn't work for me unfortunately. Any other suggestions? Edit this code html, body {width: 100% !important; height: 100% !important; overflow: hidden !important} to this html, body {width: 100% !important; height: 100% !important;} @media screen and (min-width:992px) { html, body { overflow: hidden; } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
afabella Posted July 22, 2021 Author Share Posted July 22, 2021 It worked! Thank you so much @tuanphan 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