Ellagrace Posted November 10, 2023 Posted November 10, 2023 I've tried multiple different codes and I have been able to disable the scroll on mobile but not on the hamburger mobile menu. I have used this for the desktop code injection > header <style> body { overflow-y: hidden; } </style> And I have tried other code from various forums on squarespace in the custom css too; but they haven't given me the results I need. Does anyone have an answer? should I put putting header-mobile ?
Ziggy Posted November 10, 2023 Posted November 10, 2023 Can you share your website URL? What is the problem you're trying to solve by disabling overflow and scroll? Doing that can cause lots of potential issues. Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
Ellagrace Posted November 10, 2023 Author Posted November 10, 2023 Yes no problem, Its more visual tbh rather than not having one at all, I wouldn't mind the scroll on the homepage, but we want the mobile hamburger menu to look cleaner as I think the X when you click onto the hamburger menu looks out of alignment due to the scroll bar, but I could be wrong. https://gerbil-sepia-2p62.squarespace.com/config BetterGas14
tuanphan Posted November 12, 2023 Posted November 12, 2023 On 11/10/2023 at 5:09 PM, Ellagrace said: Yes no problem, Its more visual tbh rather than not having one at all, I wouldn't mind the scroll on the homepage, but we want the mobile hamburger menu to look cleaner as I think the X when you click onto the hamburger menu looks out of alignment due to the scroll bar, but I could be wrong. https://gerbil-sepia-2p62.squarespace.com/config BetterGas14 Try this code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function() { $(".burger-inner").click(function() { $('html').addClass('html-burger-open'); }); }); </script> <style> html.html-burger-open { overflow: hidden; } </style> 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!)
Ellagrace Posted November 13, 2023 Author Posted November 13, 2023 Hi Tuanphan, Unfortunately that didn't work 😞
tuanphan Posted November 18, 2023 Posted November 18, 2023 On 11/13/2023 at 4:23 PM, Ellagrace said: Hi Tuanphan, Unfortunately that didn't work 😞 It looks fine to me now. Did you fix it? 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment