JustUpstairs Posted December 15, 2022 Share Posted December 15, 2022 (edited) 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 December 15, 2022 by JustUpstairs missed word Link to comment
Beyondspace Posted December 15, 2022 Share Posted December 15, 2022 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, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight 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
JustUpstairs Posted December 15, 2022 Author Share Posted December 15, 2022 No it doesn't work. In the CSS everything after https:// is seen as a comment and not a URL. The link itself works if you paste into a browser etc... but doesn't in CSS as for some reason its seeing the // as a comment indicator. Link to comment
Solution paul2009 Posted December 15, 2022 Solution Share Posted December 15, 2022 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 ⬇️ Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original 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 completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment