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
suchy_precelek Posted April 5 Share Posted April 5 Hi, I'm having a similar problem, can't figure out why this doesn't work on other devices: @font-face { font-family: 'ArrayProportional'; src: url('https://static1.squarespace.com/static/640ddefdac40881b9bc3976c/t/640de84bf64f5b07879306f6/1678633035182/ArrayProportional-Regular.otf'); } h1 {font-family: 'ArrayProportional'!important;} h2 {font-family: 'ArrayProportional'!important;} h3 {font-family: 'ArrayProportional'!important;} h4 {font-family: 'ArrayProportional'!important;} @font-face { font-family: 'Karla-Regular'; src: url('https://static1.squarespace.com/static/640ddefdac40881b9bc3976c/t/640dea21a0aa3d7ce486ead1/1678633506007/Karla-Regular.ttf'); } p {font-family: 'Karla-Regular'!important;} sqsrte-small { font-family: 'Karla-Regular'!important; } sqsrte-large { font-family: 'Karla-Regular'!important; } // Site Title // .header-title-text a { font-size: 16px; font-family: 'ArrayProportional' !important; } // Site Navigation // .header-nav-item a { font-size: 16px; font-family: 'Karla-Regular' !important; } // Button // .header-actions-action .btn { font-family: 'Karla-Regular' !important; } // Announcement Bar // .sqs-announcement-bar-url a { font-family: 'Karla-Regular' !important; } // Small or Tertiary Button // .sqs-block-button-element--small, .sqs-button-element--tertiary { font-family: 'Karla-Regular' !important; } // Medium or Primary Button // .sqs-block-button-element--medium, .sqs-button-element--primary { font-family: 'Karla-Regular' !important; } // Large or Secondary Button // .sqs-block-button-element--large, .sqs-button-element--secondary { font-family: 'Karla-Regular' !important; } // Newsletter Form Title // .newsletter-form-header-title { font-family: 'Karla-Regular' !important; } // Newsletter Form Description // .newsletter-form-header-description p { font-family: 'Karla-Regular' !important; } // Newsletter Form Fields // .newsletter-form-field-element { font-family: 'Karla-Regular' !important; } // Newsletter Form Button // .newsletter-form-button { font-family: 'Karla-Regular' !important; } // Newsletter Form Footnote // .newsletter-form-footnote { font-family: 'Karla-Regular' !important; } Would greately appreciate any help! Link to comment
tuanphan Posted April 8 Share Posted April 8 On 4/5/2023 at 7:16 PM, suchy_precelek said: Hi, I'm having a similar problem, can't figure out why this doesn't work on other devices: @font-face { font-family: 'ArrayProportional'; src: url('https://static1.squarespace.com/static/640ddefdac40881b9bc3976c/t/640de84bf64f5b07879306f6/1678633035182/ArrayProportional-Regular.otf'); } h1 {font-family: 'ArrayProportional'!important;} h2 {font-family: 'ArrayProportional'!important;} h3 {font-family: 'ArrayProportional'!important;} h4 {font-family: 'ArrayProportional'!important;} @font-face { font-family: 'Karla-Regular'; src: url('https://static1.squarespace.com/static/640ddefdac40881b9bc3976c/t/640dea21a0aa3d7ce486ead1/1678633506007/Karla-Regular.ttf'); } p {font-family: 'Karla-Regular'!important;} sqsrte-small { font-family: 'Karla-Regular'!important; } sqsrte-large { font-family: 'Karla-Regular'!important; } // Site Title // .header-title-text a { font-size: 16px; font-family: 'ArrayProportional' !important; } // Site Navigation // .header-nav-item a { font-size: 16px; font-family: 'Karla-Regular' !important; } // Button // .header-actions-action .btn { font-family: 'Karla-Regular' !important; } // Announcement Bar // .sqs-announcement-bar-url a { font-family: 'Karla-Regular' !important; } // Small or Tertiary Button // .sqs-block-button-element--small, .sqs-button-element--tertiary { font-family: 'Karla-Regular' !important; } // Medium or Primary Button // .sqs-block-button-element--medium, .sqs-button-element--primary { font-family: 'Karla-Regular' !important; } // Large or Secondary Button // .sqs-block-button-element--large, .sqs-button-element--secondary { font-family: 'Karla-Regular' !important; } // Newsletter Form Title // .newsletter-form-header-title { font-family: 'Karla-Regular' !important; } // Newsletter Form Description // .newsletter-form-header-description p { font-family: 'Karla-Regular' !important; } // Newsletter Form Fields // .newsletter-form-field-element { font-family: 'Karla-Regular' !important; } // Newsletter Form Button // .newsletter-form-button { font-family: 'Karla-Regular' !important; } // Newsletter Form Footnote // .newsletter-form-footnote { font-family: 'Karla-Regular' !important; } Would greately appreciate any help! What is your site url? We can check easier 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
emilysilverfranklin Posted May 1 Share Posted May 1 Site URL: https://hypersphere-papaya-gjr4.squarespace.com -- Hello! I am also having this problem–my custom font is showing up on my local machine, but not my phone or when I share the site with others. I was able to fix the issue with the paragraph font by reading through this thread, but the font on all of the buttons is breaking. I know only the very basics of CSS, so I'm sure I'm doing something wrong! Here is the CSS I'm using: -- @font-face { font-family: 'Muli'; src: url('https://static1.squarespace.com/static/6430411157597016a5102b3b/t/643041733d350627d9670839/1680884083339/Muli.ttfhttps://static1.squarespace.com/static/6430411157597016a5102b3b/t/643041733d350627d9670839/1680884083339/Muli.ttf'); } h3 {font-family: 'Muli';} h3 { font-family: 'Muli'; font-weight: 500; font-style: normal; font-size: 16px; letter-spacing: 0.01em; text-transform: none; line-height: 1.5em; } p {font-family: 'Muli'!important; } p { font-family: 'Muli'; font-weight: 500; font-style: normal; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.5em; } .sqsrte-small { font-family: 'Muli'; font-weight: 500; font-style: normal; font-size: 16px; letter-spacing: 0.01em; text-transform: none; line-height: 1.5em; } .header-nav *, nav.header-menu-nav-list * { font-family: 'Muli' !important; } .sqs-block-form .field-element::placeholder { font-family: 'Muli' !important; } .form-wrapper .field-list .field select { font-family: 'Muli' !important; font-style: normal !important; font-size: 10px; } /* Links underline */ div.accordion-item__description p a { border-bottom: 1px solid black; } /* Links font style */ div.accordion-item__description p { font-family: 'Muli'; font-weight: 500; font-style: normal; font-size: 16px; letter-spacing: 0.01em; text-transform: none; line-height: 1.5em; } .form-wrapper .field-list .field .caption { font-family: 'Muli'!important; font-weight: 500 !important; font-style: normal !important; font-size: 16px !important; text-transform: normal !important; line-height: 1.5em !important; } .form-wrapper .field-list .title { font-family: 'Muli'!important; font-weight: 500 !important; font-style: normal !important; text-transform: uppercase !important; line-height: 1.5em !important; } @font-face { font-family: 'Muli-Bold'!important; src: url('https://static1.squarespace.com/static/6430411157597016a5102b3b/t/64304dc6647a77328ef7b426/1680887238600/Muli-Bold.ttf'); } // Medium or Primary Button // .sqs-block-button-element--medium, .sqs-button-element--primary { font-family: 'Muli-Bold' !important; text-transform: uppercase; } //does not work// // Small or Tertiary Button // .sqs-block-button-element--small, .sqs-button-element--tertiary { font-family: 'Muli-Bold' !important; text-transform: uppercase; } // Large or Secondary Button // .sqs-block-button-element--large, .sqs-button-element--secondary { font-family: 'Muli-Bold' !important; text-transform: uppercase; } .header-actions-action--cta .sqs-button-element--primary { font-family: 'Muli-Bold'!important; } .donation-block { font-family: 'Muli-Bold'!important; } .sqs-block-button-element { font-family: 'Muli-Bold'!important; } Link to comment
tuanphan Posted May 3 Share Posted May 3 On 5/1/2023 at 8:39 PM, emilysilverfranklin said: Site URL: https://hypersphere-papaya-gjr4.squarespace.com -- Hello! I am also having this problem–my custom font is showing up on my local machine, but not my phone or when I share the site with others. I was able to fix the issue with the paragraph font by reading through this thread, but the font on all of the buttons is breaking. I know only the very basics of CSS, so I'm sure I'm doing something wrong! Here is the CSS I'm using: -- @font-face { font-family: 'Muli'; src: url('https://static1.squarespace.com/static/6430411157597016a5102b3b/t/643041733d350627d9670839/1680884083339/Muli.ttfhttps://static1.squarespace.com/static/6430411157597016a5102b3b/t/643041733d350627d9670839/1680884083339/Muli.ttf'); } h3 {font-family: 'Muli';} h3 { font-family: 'Muli'; font-weight: 500; font-style: normal; font-size: 16px; letter-spacing: 0.01em; text-transform: none; line-height: 1.5em; } p {font-family: 'Muli'!important; } p { font-family: 'Muli'; font-weight: 500; font-style: normal; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.5em; } .sqsrte-small { font-family: 'Muli'; font-weight: 500; font-style: normal; font-size: 16px; letter-spacing: 0.01em; text-transform: none; line-height: 1.5em; } .header-nav *, nav.header-menu-nav-list * { font-family: 'Muli' !important; } .sqs-block-form .field-element::placeholder { font-family: 'Muli' !important; } .form-wrapper .field-list .field select { font-family: 'Muli' !important; font-style: normal !important; font-size: 10px; } /* Links underline */ div.accordion-item__description p a { border-bottom: 1px solid black; } /* Links font style */ div.accordion-item__description p { font-family: 'Muli'; font-weight: 500; font-style: normal; font-size: 16px; letter-spacing: 0.01em; text-transform: none; line-height: 1.5em; } .form-wrapper .field-list .field .caption { font-family: 'Muli'!important; font-weight: 500 !important; font-style: normal !important; font-size: 16px !important; text-transform: normal !important; line-height: 1.5em !important; } .form-wrapper .field-list .title { font-family: 'Muli'!important; font-weight: 500 !important; font-style: normal !important; text-transform: uppercase !important; line-height: 1.5em !important; } @font-face { font-family: 'Muli-Bold'!important; src: url('https://static1.squarespace.com/static/6430411157597016a5102b3b/t/64304dc6647a77328ef7b426/1680887238600/Muli-Bold.ttf'); } // Medium or Primary Button // .sqs-block-button-element--medium, .sqs-button-element--primary { font-family: 'Muli-Bold' !important; text-transform: uppercase; } //does not work// // Small or Tertiary Button // .sqs-block-button-element--small, .sqs-button-element--tertiary { font-family: 'Muli-Bold' !important; text-transform: uppercase; } // Large or Secondary Button // .sqs-block-button-element--large, .sqs-button-element--secondary { font-family: 'Muli-Bold' !important; text-transform: uppercase; } .header-actions-action--cta .sqs-button-element--primary { font-family: 'Muli-Bold'!important; } .donation-block { font-family: 'Muli-Bold'!important; } .sqs-block-button-element { font-family: 'Muli-Bold'!important; } This url doesn't exist. You have a duplicate url, try checking it carefully 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment