rhonad Posted November 21, 2021 Posted November 21, 2021 Site URL: http://www.thesupremecollective.co.uk Hi everyone! I'm so hoping someone will be able to help me. I've scoured these forums and also the the web and feel like I'm getting closer but still no joy as of yet! I wanted a minimalist look for my navigation menu, so I've put all my nav links in a folder - this works great on desktop. However when on mobile, I don't like that you click the burger icon and then you have to go and click 'Menu' (which is what I've named my parent folder) to get the list of links. I'd rather those links just be there straight away. I believe the key is in setting aria-expanded to true. I'm a beginner coder (at best! ha!) Any help would be much appreciated. I've put this in Design> Custom CSS: // Trying to make the mobile menu automatically show as dropped down - doesn't work! // #mobileNav .folder-parent a { aria-haspopup: "false" !important; aria-expanded: "true" !important; } I'm on squarespace 7.0 Marquee. Website is www.thesupremecollective.co.uk Thank you everyone in advance. x
Beyondspace Posted November 21, 2021 Posted November 21, 2021 4 hours ago, rhonad said: Site URL: http://www.thesupremecollective.co.uk Hi everyone! I'm so hoping someone will be able to help me. I've scoured these forums and also the the web and feel like I'm getting closer but still no joy as of yet! I wanted a minimalist look for my navigation menu, so I've put all my nav links in a folder - this works great on desktop. However when on mobile, I don't like that you click the burger icon and then you have to go and click 'Menu' (which is what I've named my parent folder) to get the list of links. I'd rather those links just be there straight away. I believe the key is in setting aria-expanded to true. I'm a beginner coder (at best! ha!) Any help would be much appreciated. I've put this in Design> Custom CSS: // Trying to make the mobile menu automatically show as dropped down - doesn't work! // #mobileNav .folder-parent a { aria-haspopup: "false" !important; aria-expanded: "true" !important; } I'm on squarespace 7.0 Marquee. Website is www.thesupremecollective.co.uk Thank you everyone in advance. x Correct approach is @media only screen and (max-width: 768px) { #mobileNav ul li.folder ul { display: block; } #mobileNav ul li .folder-parent>a:first-child:before { content: '' !important; } } rhonad 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
rhonad Posted January 1, 2022 Author Posted January 1, 2022 Thank you so much @bangank36 - you don't know how long I've been trying to fix this. I really appreciate your help so much. I added your code - it works perfectly! Thank you again!! The menu parent folder name is slightly misaligned. I've tried centering with 'text-align' property but it didn't work. Any ideas?
tuanphan Posted January 2, 2022 Posted January 2, 2022 @rhonad to align text "menu", add this CSS #mobileNav .folder-parent a span { display: block; } 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