SamFord Posted September 16, 2023 Share Posted September 16, 2023 Hello! For some reason my custom CSS font is not working on browsers (other than Chrome) and on all mobiles. I'm only using one custom font, applied to all of the headers and some buttons. I've double checked the code and it appears to me that there are no mistakes. I've also tried adding two src: on for each bit of code and that hasn't helped either. Here is the code I'm using for the entire website: font-face { font-family: 'Sinclaire'; src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); }h1 {font-family: 'Sinclaire';} font-face { font-family: 'Sinclaire'; src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); }h2 {font-family: 'Sinclaire';} font-face { font-family: 'Sinclaire'; src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); }h3 {font-family: 'Sinclaire';} font-face { font-family: 'Sinclaire'; src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); }h4 {font-family: 'Sinclaire';} h4 {font-family: 'Sinclaire'; font-size:20px; } .sqs-block-button-element { font-family: 'Sinclaire' !important; } .header-nav-item a { font-family: 'Sinclaire' !important; } time.summary-metadata-item.summary-metadata-item--date { font-family: 'Sinclaire' !important; } a.summary-title-link { font-family: 'Sinclaire' !important; } a.summary-read-more-link { font-family: 'Sinclaire' !important; } .header-title a { font-family: 'Sinclaire' !important; } If you can help, I'd really appreciate it! Thank you! Sam 🙂 Link to comment
Solution CassAggett Posted September 17, 2023 Solution Share Posted September 17, 2023 (edited) @SamFord Hi Sam, the error causing this is likely the missing @ before font-face, however you've also got a lot of duplicated code in there. I've tidied up for you, give this a go: // LOAD CUSTOM FONT // @font-face { font-family: 'Sinclaire'; src: url('https://static1.squarespace.com/static/63e6381a7bda54190b25aa55/t/650024760b79e94d77bb7c36/1694508150296/Sinclaire-Bold.otf'); } // APPLY CUSTOM FONT // h1, h2, h3, h4 { font-family: 'Sinclaire' !important; } h4 { font-size:20px; } .sqs-block-button-element, .header-nav-item a, time.summary-metadata-item.summary-metadata-item--date, a.summary-title-link, a.summary-read-more-link, .header-title a { font-family: 'Sinclaire' !important; } Edited September 17, 2023 by CassAggett tuanphan 1 If this helped you, please like or mark my solution as answer so others can scroll to it quickly 👆 Cass Aggett is a Squarespace website designer for go-getting women – no matter what stage of business. WEBSITE • INSTAGRAM Link to comment
SamFord Posted September 17, 2023 Author Share Posted September 17, 2023 Hey Cass, Thank you so much for your help! I'm very new to CSS stuff so thank you for fixing the problem for me! It works great now! Sam 🙂 CassAggett 1 Link to comment
CassAggett Posted September 17, 2023 Share Posted September 17, 2023 11 hours ago, SamFord said: Hey Cass, Thank you so much for your help! I'm very new to CSS stuff so thank you for fixing the problem for me! It works great now! Sam 🙂 Glad to hear! 😊 If this helped you, please like or mark my solution as answer so others can scroll to it quickly 👆 Cass Aggett is a Squarespace website designer for go-getting women – no matter what stage of business. WEBSITE • INSTAGRAM 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