Jump to content

Font breaks for heading fonts

Recommended Posts

When I look at the mobile format in Squarespace everything is spaced correctly, but on my phone the headlines break. I know that's because my phone screen must be a smaller dimension, but I can't figure out how to make JUST the mobile font smaller so it will fit on one line (for header 1) and not break mid-word (for header 2). I'm using the Basil template.

Screenshot 2023-09-15 at 09.46.43.png

IMG_3432.png

IMG_3431.png

IMG_3430.png

Link to comment

Add this to Custom CSS:

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

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

Website -> Website Tools (scroll to bottom) -> Custom CSS, paste that code in and save.

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
On 9/15/2023 at 9:24 PM, JanetMarieG said:

There weren't any website tools, but I went to Website Settings > Developer Tools > Code Injection. I put the code in but it comes up in the design instead of changing anything.

Screenshot 2023-09-15 at 10.19.14.png

Screenshot 2023-09-15 at 10.18.16.png

Screenshot 2023-09-15 at 10.19.14.png

Screenshot 2023-09-15 at 10.23.22.png

If you add to Code Injection, you need to wrap code in style tag, unless it will appear in above header, like as your screenshot

<style>
  h1, h2, h3, h4 {
  -webkit-hyphens: manual !important; 
  -moz-hyphens: manual !important; 
  -ms-hyphens: manual !important; 
  hyphens: manual !important;  
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.