SeeWhy Posted June 17, 2020 Posted June 17, 2020 Site URL: https://www.crossingtheline.online/ Site password: ctlonline Hi there, I'm hoping for some help with creating a mobile navigation menu using the Header Content of my site. I've currently disabled mobile nav using: #mobileMenuLink a { visibility: hidden; } I am using the Header Content for my site menu (see screenshots attached) - and would like this to also appear as a mobile menu with hamburger icon or dropdown. Any help would be much appreciated, Thanks!
Beyondspace Posted June 17, 2020 Posted June 17, 2020 Hi SeeWhy, I can provide you snippet for the hambuger menu style like so But the proceed of animation is complex than I expected so if you want to go furthur you can pm me @media only screen and (max-width: 800px) { #headerBlocks { display: block !important; position: fixed; z-index: 9999; background: #fff; width: 100%; height: 100%; left: 0; top: 0; padding: 10px; } #headerBlocks .sqs-block-content h2>strong { display: none; } #headerBlocks .sqs-block-content h2~* { -display: none; } #headerBlocks .sqs-block-content h2 { background: black; width: 40px; height: 5px !important; position: relative; -webkit-transition: background 10ms 300ms ease; transition: background 10ms 300ms ease; -webkit-transform: translateY(20px); transform: translateY(20px); display: inline-block; color: #fff; text-indent: -9999px; top: -15px; cursor: pointer; margin: 0; display: flex; } #headerBlocks .sqs-block-content h2:before, #headerBlocks .sqs-block-content h2:after { -webkit-transition: top 300ms 350ms ease, -webkit-transform 300ms 50ms ease; transition: top 300ms 350ms ease, -webkit-transform 300ms 50ms ease; transition: top 300ms 350ms ease, transform 300ms 50ms ease; transition: top 300ms 350ms ease, transform 300ms 50ms ease, -webkit-transform 300ms 50ms ease; position: absolute; background: black; top: -12px; width: 40px; height: 5px; content: ''; cursor: pointer; } #headerBlocks .sqs-block-content h2:before { top: -25px; } } Hambuger inspriration from: https://codepen.io/fabean/pen/XXegoQ Cheers 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
SeeWhy Posted June 17, 2020 Author Posted June 17, 2020 Thank you! @bangank36 ! Last question: Is there a way to get the menu to be concealed (in the hamburger) by default, then appear when you click on the hamburger? At the moment, the menu is sitting on top of the other content and not hiding when I click the hamburger. If that is too complex, is there a way to just have the menu sitting above the rest of the content, so you see the menu, then scroll down to start the rest of the site?
Beyondspace Posted June 17, 2020 Posted June 17, 2020 Get rid of these lines to make it display on top 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
SeeWhy Posted June 17, 2020 Author Posted June 17, 2020 Thanks again @bangank36! Final question - is there a code I can use to hide the inbuilt navigation menu on desktop view, but display it on mobile?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.