Jump to content

Desktop Mobile menu css breaks when I add product page

Recommended Posts

I've been using the forced mobile menu CSS for my website for a while with no issues but today I added a product page and that broke my CSS for some reason. First img is what it usually looks like and the second image is what happened when I added the product page. Website password is 1234

Here's the code is usually use:

// Forced mobile //
@media screen and (max-width: 5000px) {
  /* Display burger icon at all widths and align right */
  .header .header-burger {
    display: flex;
    order: 2 !important;
  }
  /* Make burger menu visible at all widths */
  .header--menu-open .header-menu {
    opacity: 1;
    visibility: visible;
  }
  /* Center logo in mobile device */
  .header-title {
    text-align: left !important;
  }
  /* Hide primary navigation menu */
  .header .header-title-nav-wrapper .header-nav {
    display: none;
  }
}
// Hide nav elements //
.header-nav, .header-actions .btn  {
  display: none;
}

image.thumb.png.da211b3afa0739222580383647ff9d6a.png

image.thumb.png.60c51b86f3f4eb8143cb3053c135f8f8.png

Edited by Simplymarble
added css
Link to comment
  • Replies 7
  • Views 216
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Adding a store shouldn't have affected your CSS, what happens when you remove the store page?

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) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Hey, that's so strange. I don't understand the mechanism that would cause that. Is it to do with the store page having a background image on the first section?

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) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
20 minutes ago, Ziggy said:

Hey, that's so strange. I don't understand the mechanism that would cause that. Is it to do with the store page having a background image on the first section?

Unfortunately, no. I used both store templates and used different sections to see if it would make a difference but it has not.

Link to comment

Update: I just switched to this CSS that I used on an older website and it went back to normal:

// Forced mobile //
@media screen and (max-width: 5000px) {
  /* Display burger icon at all widths and align right */
  .header .header-burger {
    display: flex;
    order: 2 !important;
  }
  /* Make burger menu visible at all widths */
  .header--menu-open .header-menu {
    opacity: 1;
    visibility: visible;
  }
  /* Center logo in mobile device */
  .header-title {
    text-align: left !important;
  }
  /* Hide primary navigation menu */
  .header .header-title-nav-wrapper .header-nav {
    display: none;
  }
}
// Hide nav elements //
.header-nav, .header-actions {
  display: none;
}

 

-----

I'm not sure why this one is compatible with a product page but the other one isn't.

Link to comment
44 minutes ago, Simplymarble said:

Update: I just switched to this CSS that I used on an older website and it went back to normal:

That's good, if unexplained!

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) 
 🖼️ Gallery Lightbox 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.