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: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

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: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

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.