londonumlungu Posted August 27, 2020 Share Posted August 27, 2020 Site URL: http://lckdn20.com Hi there, Can anyone pls tell me what is wrong with this code when trying to upload a Google font via custom CSS. Thanks Dave Link to comment
IXStudio Posted August 27, 2020 Share Posted August 27, 2020 Hi, Please share your website URL. But use this code. @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap'); h1{font-family: 'Roboto', sans-serif !important;} Please use the like button if it helps you! Best, Leopold Ninja Kit Extension: Upgrade your Squarespace website without coding.YouTube Preview - FREE DOWNLOAD Link to comment
londonumlungu Posted August 28, 2020 Author Share Posted August 28, 2020 Hi Leopold Thanks for the help! The site is: http://lckdn20.com/ Unfortuantely that code didn't work. I;ve pasted a screenshot below. Can I just ask, wouldn't there need to be a middle line of code between @import and h1, which would be: @font-face{font-family: 'Roboto', sans-serif;} ? I tried that out of curiosity, and that didn't work either, screenshot below. Thanks Dave Link to comment
IXStudio Posted August 28, 2020 Share Posted August 28, 2020 Hi Dave, Please contact me via Skype: LeopoldJobs. I'll check it for you. Please use the like button if it helps you! Best, Leopold Ninja Kit Extension: Upgrade your Squarespace website without coding.YouTube Preview - FREE DOWNLOAD Link to comment
tuanphan Posted August 29, 2020 Share Posted August 29, 2020 You can add to Home > Settings > Advanced > Code Injection > Header <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet"> then add to Home > Design > Custom CSS h1 { font-family: 'Roboto', sans-serif; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
paul2009 Posted August 29, 2020 Share Posted August 29, 2020 On 8/27/2020 at 5:14 PM, londonumlungu said: Can anyone pls tell me what is wrong with this code when trying to upload a Google font via custom CSS. I'm not clear why you are trying to add the Roboto font with code. Many Google Fonts are built into Squarespace and can be used without requiring code: If this helps you, please click "Like" 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
Archived
This topic is now archived and is closed to further replies.