Jump to content

Text Hyphenating on Mobile, no mobile vs. desktop se

Recommended Posts

  • Replies 2
  • Views 835
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

@ben_reformedco You can prevent the hyphenation with the code below. Add the code under Website > Utilities > Website Tools > Custom CSS

h1, h2, h3, h4, h5, h6, p {
	-moz-hyphens: none !important;
	-ms-hyphens: none !important;
	-webkit-hyphens: none !important;
	hyphens: none !important;
}

You can use the code below to shrink the font size on mobile:

@media only screen and (max-width: 640px) {
	h1, h2, h3, h4, h5, h6 {
		letter-spacing: -0.01px !important;
	}
}

You can also reduce the font size. For instance, to reduce the font-size for the h1 heading tag, you can use the code below:

@media only screen and (max-width: 640px) {
	h1 {
		font-size: 28px !important;
	}
}

 

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? 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.