Jump to content

Seeing website code when visiting site from mobile

Go to solution Solved by Ziggy,

Recommended Posts

It looks like you have style code in the header code injection (either global or page) that doesn't have <style></style> tags around it so it is being rendered as text.

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

Hi, this is the code that I have on the home page:

 

.sqs-block-button-element-medium {
    border-width: 10px !important;
}
.product-quantity-input {
    display: none !important;
}
.product-quantity-input {
    display: none !important;
}
.sqs-block-button-element-medium {
    border-width: 10px !important;
}
 .sqs-add-to-cart-button-wrapper,
 .product-quantity-input {
   display:none;
   visibility:hidden;
}

Link to comment
  • Solution
1 hour ago, Rodney1234 said:

Hi, this is the code that I have on the home page:

If you want to place this in Header Code Injection, it would need to be presented like this:

<style>
  
.sqs-block-button-element-medium {
    border-width: 10px !important;
}
.product-quantity-input {
    display: none !important;
}
.product-quantity-input {
    display: none !important;
}
.sqs-block-button-element-medium {
    border-width: 10px !important;
}
 .sqs-add-to-cart-button-wrapper,
 .product-quantity-input {
   display:none;
   visibility:hidden;
}
  
</style>

Without the style tags, it gets rendered as plain text and will not have any effect on the page styling.

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
Just now, Rodney1234 said:

Thank you so much, Ziggy.  Really appreciate the help.  That fixed the issue.  Thanks again!

No problem!

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.