Jump to content

Shrink header is impacting menu spacing

Recommended Posts

Posted

Hello! I was able to get a sticky nav working well thanks to @tuanphan and @Ziggy's work in other threads. I've got just one small snag I can't figure out. 

I have a burger menu on desktop and mobile. When the user scrolls down the page and then clicks to open the burger menu, the shrink header spacing is being applied. Screenshots attached as I'm having a hard time describing. I can't seem to isolate this in the CSS. I would be so grateful for your insight! 

page password: 140ann

Screen Shot 2023-04-05 at 10.33.08 AM.jpg

Screen Shot 2023-04-05 at 10.33.24 AM.jpg

Posted

Sure, can you share your website URL?

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

Does this help?

.header-layout-branding-center .header-title {
  margin-top:12px;
}

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
On 4/7/2023 at 1:10 AM, mbockmaster said:

Thanks for looking! Unfortunately not. That code targets the entire header whereas I need to fix the spacing only on shrink.

Change code to this

header#header.shrink .header-title {
  margin-top:12px;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 2 weeks later...
Posted

Oh my gosh, through so much trial and error, I was able to fix it on my own!!! I used the selectors below and gave it the same padding as the .header-announcement-bar-wrapper 🙂

 

.header--menu-open .shrink .header-announcement-bar-wrapper 

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.