Jump to content

Mobile Menu using Header Content Wells

Recommended Posts

Posted

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!

Desktop menu.png

no-mobile-display.jpg

  • Replies 4
  • Views 1k
  • Created
  • Last Reply
Posted

Hi SeeWhy,

I can provide you snippet for the hambuger menu style like so

image.png.7666a63dab786ddcc4fcb8b5c8481c33.png

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

Posted

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?

screenshot mobile.jpg

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.