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) 🗓️ 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
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 ⬇️ About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥. Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. Content: Views and opinions are my own. Links in my posts may refer to 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 is optional. 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