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
  • 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

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, 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: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

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.