Jump to content

Help with Desktop Hamburger Menu

Go to solution Solved by Ziggy,

Recommended Posts

Posted

Hi, I have used this code to add a hamburger menu to the desktop version of my site.

/* Hamburger nav on desktop */
.header .header-burger{display:flex}
.header-nav, .header-actions {display:none}
.header--menu-open .header-menu {
opacity: 1; visibility: visible;}
.header-menu-nav-item {line-height: 20px!important;}

This works great but I have noticed that there is now a strikethrough over the text of whatever page I am currently on. Is there a way to make this an underline rather than a strikethrough?

I have also noticed that the hamburger icon has knocked my logo off centre. Is there also a way to fix this?

Thank you in advance for any help!

Chris

 

Password: parttwo

Screenshot 2023-08-01 at 10.17.29.png

Screenshot 2023-08-01 at 10.17.50.png

Posted

Can you share your website URL?

This may be the reason for the underline becoming a strikethrough:
.header-menu-nav-item {line-height: 20px!important;}

Try changing it to 1.2em from 20px.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

  • Solution
Posted

Center the title:

.header-title-nav-wrapper {
    margin-left: 47px;
}

Can you remove the 20px line height property entirely, and use this instead to adjust the spacing between elements:

.header-menu-nav-item a {
  margin: 1vw 4vw;
}

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

Try this instead:

@media only screen and (min-width:768px) {
  .header-title-nav-wrapper {
     margin-left: 47px;
  }
}

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.