Drumbeat Posted January 24, 2022 Share Posted January 24, 2022 (edited) Site URL: https://tgtkb.squarespace.com Hi, Bit of a newbie question, and from someone who isn't too familiar with CSS! I'm trying to use a custom font on my site: https://tgtkb.squarespace.com (no password). It displays great on my browser/machine but not on anyone I've shared it with. I've used the following code: ---------------- @font-face { font-family: ‘Trap’; src: url(https://static1.squarespace.com/static/61dee34ed473a2098445cfc0/t/61dee6997e587357fb96ad94/1641997977602/Trap-Regular.woff); } h1, h2, h3, h4, p {font-family: 'Trap' !important} .quantity-label { font-family: Trap;} .sqs-add-to-cart-button-inner { font-family: Trap;} .product-quantity-input { font-family: Trap;} .Quantity { font-family: Trap;} .header-nav *, nav.header-menu-nav-list * { font-family: Trap;} @media screen and (max-width: 640px) { h1 { font-size: 40px !important; }} ---------------- There's some additional CSS in there for font size as well as forcing the font in certain other areas of the site, but can anyone shed any light on where I'm going wrong? Like I say it looks great on my browser, but imagine that's because I've got the font installed locally maybe? TIA Andy Edited January 24, 2022 by Drumbeat Link to comment
tuanphan Posted January 25, 2022 Share Posted January 25, 2022 Your code is invalid, use this new code @font-face { font-family: Trap; src: url(https://static1.squarespace.com/static/61dee34ed473a2098445cfc0/t/61dee6997e587357fb96ad94/1641997977602/Trap-Regular.woff) } h1,h2,h3,h4,p, .quantity-label, .sqs-add-to-cart-button-inner, .product-quantity-input, .header-nav *,nav.header-menu-nav-list * { font-family: Trap !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Drumbeat Posted January 25, 2022 Author Share Posted January 25, 2022 Brilliant, thanks so much! 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