Jump to content

Help! My CSS code is showing up in my header on the mobile site

Recommended Posts

Hi all!

*preface* I am NOT coding literate and I am brand new to trying to create a website. 

I inserted some code into my CSS but now it is showing up in my header on my mobile set when you go to "shop" I made sure it was deleted from my code injection but I am struggling. I tried adding the <style></style> but it says that there is a syntax error in line one.

Any help would be appreciated! Thank you!

the sauce site.png

Edited by tkahle
Link to comment
  • Replies 8
  • Views 335
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Can you share your website URL?

Most likely you have added un-tagged CSS code to your Header Code Injection.

Edited by Ziggy

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, tkahle said:

Hi all!

*preface* I am NOT coding literate and I am brand new to trying to create a website. 

I inserted some code into my CSS but now it is showing up in my header on my mobile set when you go to "shop" I made sure it was deleted from my code injection but I am struggling. I tried adding the <style></style> but it says that there is a syntax error in line one.

Any help would be appreciated! Thank you!

the sauce site.png

Can you share your URL so I can check it? where are  you putting the CSS code

Press 👍  or mark my comment as solution if you find my sharing useful

🆒 Squarespace pinchzoom lightbox plugin (affiliate link)

👁‍🗨 360 degree photo viewer (affiliate link)

Link to comment
Just now, tkahle said:

On the Store page, go into the page settings and go to Header Code injection. If you are adding style code here, then you need to wrap it in <style> tags like this so your browser knows that it is CSS and not HTML:

<style>

.header-display-desktop {
    display: flex !important;
}
.header-display-mobile {
    display: none;
}
.header-burger {
    display: none;
}
.header-nav {
    display: flex !important;
}
.header-nav {
    display: flex !important;
    flex: 70% !important;
    justify-content: flex-end;
}
.header-actions.header-actions--right, .header-actions.header-actions--right div {
    display: flex !important;
    position: relative;
    left: -30px;
}}

</style>

 

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
28 minutes ago, tkahle said:

That got rid of the text but now it looks like this! 

Maybe just try removing all of the style code from the header code injection. It wasn't working before, and now it is, it isn't doing anything you want, is it?

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
13 hours ago, tkahle said:

I took out all the codes but now on the mobile site, the shop button doesnt show up. 

I don't really know what you are trying to do with that code, maybe show the desktop elements on mobile? I was just helping with the issue of text showing up. If you can expand on what you are wanting to achieve with code, I may be able to help with that as well.

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.