Jump to content

Problems with code on Custom front CCS.

Go to solution Solved by melody495,

Recommended Posts

Posted

Hi,

Squarespace is giving mehassle trying to get our custom font uploaded onto our website.

This is the code I've used but can't see what Ive done wrong:

//--- Your Custom Font ---//
@font-face{ 
font-family: 'borna';
src:
url('/borna-regular-webfont.ttf') format('truetype'),
url('/borna-regular-webfont.woff') format('woff'),
url('/borna-regular-webfont.woff2') format('woff2');
font-weight: 400;}

//--- Apply Site Wide---//
* { font-family:"borna" !important; }
p1 { font-family: 'borna' !important;}
p1 { font-family: 'borna'!important;
font-size: 50px !important;
color: #0F00FF !important;
line-height: 1.3 !important;
  letter-spacing: .05em !important;}

 

Can anyone help. 

  • Solution
Posted
42 minutes ago, Dorlifestyle said:

This is the code I've used but can't see what Ive done wrong:

//--- Your Custom Font ---//
@font-face{ 
font-family: 'borna';
src:
url('/borna-regular-webfont.ttf') format('truetype'),
url('/borna-regular-webfont.woff') format('woff'),
url('/borna-regular-webfont.woff2') format('woff2');
font-weight: 400;}

 

This is the font file path you have used

/borna-regular-webfont.ttf

This file path is likely incorrect. 

You should upload your font file to Custom File, then use that file path.

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Nerd

💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
🧰 See the tools I use (contain affiliate links)
 Did I help? I like coffee (Thank you)

Posted

Hi,

Squarespace is giving mehassle trying to get our custom font uploaded onto our website.

This is the code I've used but can't see what Ive done wrong:

//--- Your Custom Font ---//
@font-face{ 
font-family: 'borna';
src:
url('/borna-regular-webfont.ttf') format('truetype'),
url('/borna-regular-webfont.woff') format('woff'),
url('/borna-regular-webfont.woff2') format('woff2');
font-weight: 400;}

//--- Apply Site Wide---//
* { font-family:"borna" !important; }
p1 { font-family: 'borna' !important;}
p1 { font-family: 'borna'!important;
font-size: 50px !important;
color: #0F00FF !important;
line-height: 1.3 !important;
  letter-spacing: .05em !important;}

ive also got the font file to custom file and then used the file path.

Can anyone help. 

Posted
13 hours ago, Dorlifestyle said:

This is the code I've used but can't see what Ive done wrong:

Hi @Dorlifestyle a couple of things I've noticed

1. Your font file path doesn't look right. You have to upload your font file to custom file, then use that path. You can refer to my guide here, see Step 1 ans 2. Beginner's Guide to Squarespace's custom font

2. Your CSS selectors are not correct. p1 should be .sqsrte-large. You can refer to my guide again, see Step 3 for a table of the CSS selectors. 

Let me know how it goes. 

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Nerd

💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
🧰 See the tools I use (contain affiliate links)
 Did I help? I like coffee (Thank you)

Posted (edited)

Hi @Dorlifestyle 

Hope you are having an amazing day.

Let me try to help you out. It's really important to carefully check your code when uploading a custom font—there might be something missing. But guess what? We have a blog post that covers this exact topic! Check it out here: https://www.sparkplugin.com/blog/custom-fonts-in-squarespace.

Give it a look and let me know how it goes. Thank you.

Edited by Spark-Plugin

- Answered by Iuno from sparkplugin.com

forumsignature-recommendedcopy2.png.0579645eb1430dc7c1059541dc6456c6.png

Posted

I've answered more on the duplicate post here, probably delete one of the post if possible

https://forum.squarespace.com/topic/321189-problem-with-ccs-and-the-code/?do=findComment&comment=800201

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Nerd

💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
🧰 See the tools I use (contain affiliate links)
 Did I help? I like coffee (Thank you)

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.