Jump to content

Mobile styles not sticking?

Go to solution Solved by paul2009,

Recommended Posts

Posted

My code is working on the preview in Squarespace, but not populating in live view on my phone. Here's my code:

@media screen and (max-width: 640px) {
  #block-63164f6dd76fe71b6ab8b17e h1{
    font-size:50px;
	hyphens:none !important;  
  }
}

Any help appreciated! Thanks

IMG_8749.jpeg

Posted
27 minutes ago, kc2615 said:

My code is working on the preview in Squarespace, but not populating in live view on my phone.

Your phone may have a wider viewport than the 640 pixels specified in the code. Try using a wider higher number like 768px or 800px to see if this works.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted
4 minutes ago, paul2009 said:

Your phone may have a wider viewport than the 640 pixels specified in the code. Try using a wider higher number like 768px or 800px to see if this works.

even when I do it without mobile styles at all, it still appears hyphenated on mobile

#block-63164f6dd76fe71b6ab8b17e h1{
    hyphens:none !important;
  }
  • Solution
Posted (edited)

Have you added the various vendor prefixes for different browsers like Safari? Generally I would add:

p, h1, h2, h3 {
  -webkit-hyphens: manual !important;
  -moz-hyphens: manual !important;
  -ms-hyphens: manual !important;
  hyphens: manual !important;
}

 

Edited by paul2009

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

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.