Change font size on mobile for Squarespace website

When you’re designing a Squarespace website, you always need to design two versions - one for desktop users and one for mobile users.

With more and more people surfing the web on mobile devices (smartphones, tablets etc) it’s never been more important to ensure your website is mobile optimised and displays well on mobile screens.

One thing that you need to consider is your font size. Whilst a certain font size may look great on desktop, there’s a high chance that it won’t work so well on mobile.

The problem, however, is that Squarespace doesn’t give us the option to have different font sizes for desktop and mobile. Once you set your font size on desktop, it has to be the same on mobile.

So in order to change the font size on the mobile version of your website, you’re going to need some custom code. 

Let’s take a look at the process…

Firstly head to your design panel and select Custom CSS.

Watch the video

Check out the YouTube video below 👇

You then need to add the below code which ensures you’re targeting mobile only. This line of code is telling Squarespace that this is to target screens of a maximum size e.g. mobile devices.

@media screen and (max-width: 640px) {

}

Next you need to add the font section you want to target (h1, h2, h3, h4 etc) and add this into the code, so it’ll look like this:

@media screen and (max-width: 640px) {

h4 {

font-size: 3em !important;

}

h1 {

font-size: 2rem !important;

}

}

You can then play around with the size you want to use, determining what size looks best on mobile view. 

This will change the size of your targeted font on mobile only, leaving the desktop version at the font size you originally set it to. 

You can also copy and paste all of the above code into the CSS panel again, and make the screen size limit slightly bigger in order to change the font on tablet devices too.


📩 Join the inner circle to get exclusive code updates


If you do this, make sure to add important to the end of your mobile code in order to keep the mobile font size intact.

As always, don’t forget to hit save to complete the process.

When it comes to changing the font size on your mobile website, have a play around to discover what size looks best.


Your designer

I'm Sam, an award-winning Squarespace web designer. I have worked with every type of business, building platforms for solo entrepreneurs through to multi-million dollar corporations. If you want to discuss a potential project, you can email on sam@bycrawford.com or get in touch with me here. Alternatively, you can book in a free 15-minute consultation call here.


Want more?

Sam Crawford

This article was written by Sam Crawford, one of the world’s leading Squarespace website designers.

Sam is an official Squarespace Expert, official Squarespace Partner, official Squarespace Community Leader, official Squarespace blog contributor, official Squarespace panelist, Squarespace educator and multi-award winning Squarespace designer.

https://bycrawford.com
Previous
Previous

How to overlap blocks on Squarespace Fluid Engine

Next
Next

Change thickness of bold text on Squarespace