Jump to content

Replace burger menu with a single menu item

Go to solution Solved by Web_Solutions,

Recommended Posts

Hi all

I built a landing page that has a single persistent CTA in the desktop header that is an anchor link to the bottom-most section of the page.

Site: https://buttercup-sparrow-a7h3.squarespace.com

I need to replace the mobile burger menu with the exact same anchor link/button that is on the desktop breakpoint, or put another way—take that CTA button that also lives in the mobile menu and have it replace the mobile burger icon. I've already hidden the burger menu with the CSS below, but that's as far as I've gotten. Any help on this would be appreciated.

 

// No burger
@media screen and (max-width:1024px) {
  .header-nav {
    display: flex !important;
    justify-content: flex-end !important;
  }
  .header-burger {
    display: none !important;
  }
  .header-title {
    max-width: 48% !important;
  }
  a#site-title {
    white-space: nowrap;
  }
}
Link to comment
  • Solution
13 hours ago, jorohaco said:

 

Hi all

I built a landing page that has a single persistent CTA in the desktop header that is an anchor link to the bottom-most section of the page.

Site: https://buttercup-sparrow-a7h3.squarespace.com

I need to replace the mobile burger menu with the exact same anchor link/button that is on the desktop breakpoint, or put another way—take that CTA button that also lives in the mobile menu and have it replace the mobile burger icon. I've already hidden the burger menu with the CSS below, but that's as far as I've gotten. Any help on this would be appreciated.

 

// No burger
@media screen and (max-width:1024px) {
  .header-nav {
    display: flex !important;
    justify-content: flex-end !important;
  }
  .header-burger {
    display: none !important;
  }
  .header-title {
    max-width: 48% !important;
  }
  a#site-title {
    white-space: nowrap;
  }
}

Replace the code with the code below 

@media screen and (max-width: 1024px) {
    .header-display-desktop, .header-actions, .header-actions-action {
        display:flex !important;
    }
    .header-burger, .header-display-mobile {
        display: none !important
    }

    .header .header-title-nav-wrapper {
        flex: 1 0 60% !important
    }
    .header-title {
        max-width: 50% !important;
    }
}

 

Screenshot_149.png

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment

@Web_Solutions thanks so much that's precisely what I needed!

If you don't mind, could you explain what from this code is exposing that menu item? I'm assuming it's more so the snippet below, but I'm curious how adjusting the display to flex is exposing the menu item.

.header-display-desktop, .header-actions, .header-actions-action
Link to comment
49 minutes ago, jorohaco said:

@Web_Solutions thanks so much that's precisely what I needed!

If you don't mind, could you explain what from this code is exposing that menu item? I'm assuming it's more so the snippet below, but I'm curious how adjusting the display to flex is exposing the menu item.

.header-display-desktop, .header-actions, .header-actions-action

Yes

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.