Jump to content

When linking font in CSS - URL not working correctly.

Go to solution Solved by paul2009,

Recommended Posts

Hi All,

I am using CSS to link a custom font onto my site. When using the standed code, the // in HTTPS:// turns the url into a comment and therefore doesn't link correctly. Removing the https:// then gives me a syntax error. Everyone doing this online doesn't seem to have this issue at all. Any advice? Code I am using is below;

@font-face {
font-family: 'Curly'; 
src: url (https://static1.squarespace.com/static/5ffc1ae692e37d47576a1330/t/639b18c36c2d4e7408135839/1671108803929/CCSignLanguage+Bold+Italic.otf);
}

Thanks!

Edited by JustUpstairs
missed word
Link to comment
  • Replies 3
  • Views 207
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

1 hour ago, JustUpstairs said:

Hi All,

I am using CSS to link a custom font onto my site. When using the standed code, the // in HTTPS:// turns the url into a comment and therefore doesn't link correctly. Removing the https:// then gives me a syntax error. Everyone doing this online doesn't seem to have this issue at all. Any advice? Code I am using is below;

@font-face {
font-family: 'Curly'; 
src: url (https://static1.squarespace.com/static/5ffc1ae692e37d47576a1330/t/639b18c36c2d4e7408135839/1671108803929/CCSignLanguage+Bold+Italic.otf);
}

Thanks!

Does this font work properly when you set it in Css?

I try and can still download it from your above link

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • Solution
2 hours ago, JustUpstairs said:

When using the standard code, the // in HTTPS:// turns the url into a comment and therefore doesn't link correctly.

Place the URL in quote marks, as you did with the font name. You'll then see a line that looks something like this:

src: url ('https://static1.squarespace.com/static/myurlhere/filename.ext');

Did this help? Please give feedback by clicking an icon below  ⬇️

About me: I'm Paul. A SQSP User for 18 yrs, I joined Circle when it launched in 2016 and have been a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing expertise and extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee fuels my work.

Book paid help with a Squarespace Domain

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.