Jump to content

I Need Help With My Desktop Hamburger Nav

Recommended Posts

Hello,

I currently have some CSS that creates a specific hamburger menu that displays on desktop that is suppose to be different from the mobile hamburger. Then, I'm trying to remove any likes in the navigation that don't match the slug of my hamburger menu "/burger" - while also not wanting to show that same hamburger menu on mobile. Does that make sense?

Anyways, I can't get the links on desktop to not show (see image) despite what I think I've done correctly in CSS (see code). Can someone help?

 

/* This will handle styling the burger icon color*/
a[href='/burger'] path {
  fill: #23605b !important;
}

/* Removes the underline set by Squarespace active class */
a[href='/burger'] {
  background: none !important;
}

/* This will handle styling the background color of the burger overlay */
better-burger {
  background: #ffffff;
}

/* This will handle styling the links inside the burger menu */
better-burger a {
  color: #23605b;
}

/* This will hide the desktop burger on mobile devices*/
@media (max-width: 767px) {
  a[href='/burger'] {
    display: none;
  }
}

/* If you only want to have the desktop burger visible this CSS will remove all the */
@media (min-width: 767px) {
  .header-nav-list not([href='/burger']) {
    display: none;
  }
}
 

Screen Shot 2023-07-26 at 11.50.28 AM.png

Link to comment
  • Replies 1
  • Views 545
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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.