Jump to content

CSS Code to prevent navigation stacking is pushing mobile logo off screen

Go to solution Solved by Ziggy,

Recommended Posts

I have a site that I use css code to keep the site navigation from stacking, and it is pushing the mobile logo off-screen. It's only doing it to this site... I have a site with identical css that does not have this issue. The image shows what I mean, but I changed the mobile layout to prevent this. You can still see how the mobile logo is off-center. 

Screen Shot 2024-02-20 at 6.18.39 PM.png

Link to comment

Can you share your website URL and the code you've used?

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

tridentservices.squarespace.com

/* Change dropdown menu background */
.header-nav-folder-content {
   background: #0d1632 !important;
}
// Header Nav Width Adjustment
.header-layout-branding-center-nav-center .header-title-nav-wrapper {
  flex: 2 0 100%;
}
.header-layout-branding-center-nav-center .header-actions--right {
  position: relative;
  right: 4vw;
}
.header-menu-nav-item a {
    font-size: 30px;
}
.header-nav-folder-item a {
  color: #ffffff !important;
}

Link to comment
  • Solution

I've edited your code so the width change only affects desktop:

/* Change dropdown menu background */
.header-nav-folder-content {
  background: #0d1632 !important;
}
// Header Nav Width Adjustment
@media only screen and (min-width:768px) {
  .header-layout-branding-center-nav-center .header-title-nav-wrapper {
    flex: 2 0 100%;
  }
  .header-layout-branding-center-nav-center .header-actions--right {
    position: relative;
    right: 4vw;
  }
}
.header-menu-nav-item a {
  font-size: 30px;
}
.header-nav-folder-item a {
  color: #ffffff !important;
}

 

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
38 minutes ago, AmericanDreadnought said:

Very nice of you to help. Thank you!

You're welcome

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.