Jump to content

Mobile styles not sticking?

Go to solution Solved by paul2009,

Recommended Posts

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

Link to comment
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.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
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;
  }
Link to comment
  • Solution

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

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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.