Pascoe Posted March 4, 2022 Share Posted March 4, 2022 Site URL: https://www.cornishseaberry.co.uk Hello, I'm running the fosters template and I've tweaked the mobile breakpoint so I always get the hamburger menu- even when viewed on desktop. BUT... when you click on the hamburger the menu options drop-down completely cover the whole page-width. Is there a way of writing code to stop this menu going full width on the desktop, but it remains functional on mobile devices? I'm a complete code newbie so explanations will need to be basic! Thanks very much Link to comment
Solution paul2009 Posted March 5, 2022 Solution Share Posted March 5, 2022 21 hours ago, Pascoe said: I've tweaked the mobile breakpoint so I always get the hamburger menu- even when viewed on desktop. BUT... when you click on the hamburger the menu options drop-down completely cover the whole page-width. Yes. You can add some CSS to Design > Custom CSS to set a maximum width for the mobile overlay. For example: .Mobile-overlay { max-width: 450px; } Let me know how you get on. Did this help? Please give feedback by clicking an icon below ⬇️ Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
Pascoe Posted March 5, 2022 Author Share Posted March 5, 2022 1 hour ago, paul2009 said: Yes. You can add some CSS to Design > Custom CSS to set a maximum width for the mobile overlay. For example: .Mobile-overlay { max-width: 450px; } Let me know how you get on. Did this help? Please give feedback by clicking an icon below ⬇️ Thanks Paul, I cut and paste that code and put it into Design> custom CSS as you suggested. I put it at the very top in line one but it made no difference at all - even when I changed the max-width px. What did I do wrong?? Link to comment
paul2009 Posted March 5, 2022 Share Posted March 5, 2022 You have some other errors in your CSS that need to be fixed. Until these have been resolved (or removed) it's difficult to say what the issue is. For example color: #hsl(230,100%,50%) isn't valid. However, when you've fixed the errors, this is what you should see: Pascoe 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
Pascoe Posted March 7, 2022 Author Share Posted March 7, 2022 Paul you are a legend! I wasn't sure why that other code was even there- I certainly didn't do it! Anyway I got rid of it, re-entered your code and now the menu works just as it should. Thanks so very much! paul2009 1 Link to comment
Pascoe Posted March 7, 2022 Author Share Posted March 7, 2022 Can I ask for one more code favour Paul? Is there a way of writing code so that your selection in the drop down menu is highlighted when you move the mouse cursor over it? e.g. if I chose 'contact us' this would appear darker than the other menu options when my mouse hovers over it. Is that doable? Or is that massively complex? Would really appreciate your help on 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