Jump to content

Applying custom font to specific sections only

Go to solution Solved by Ziggy,

Recommended Posts

Posted

Hello,

I'm trying to add a signature font to 3x quote boxes on my site. 

I have uploaded my font to the Custom Files section in Custom CSS and applied the following code (I've added the font URL in):

}@font-face {
font-family: Signatie;
src: url(https://static1.squarespace.com/static/64ed4ba41f462e153ce7cb7d/t/651ce94e66fcd66d90e39203/1696393553455/Signatie.ttf);
}h1 {
font-family: 'Signatie';

I have used various header and paragraph sizes throughout my site so would ideally like to apply this to "miscellaneous" only, so I know it is only being used for these 3x specific sections.

What code do I need to add in order to do this? I'm using 7.1.

Thank you 

 

 

Posted

It's probably best to target those quote blocks directly using the block IDs.

https://squarefortytwo.com/squarespace-guides/find-an-id-in-squarespace-71

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

@Ziggy thank you, I've now created separate blocks for the copy I want in the custom font. 

 

The block IDs are below:

#block-yui_3_17_2_1_1696896549515_2160

#block-yui_3_17_2_1_1696896579340_2262

Block ID: #block-yui_3_17_2_1_1696896579340_4400

 

I have tried applying this to the below code, but something isn't right (sintax error):

{#block-yui_3_17_2_1_1696896549515_2160 font-family: 'Signatie';
}

Please can you correct this?

Thank you 
 

  • Solution
Posted
7 hours ago, SPR_85 said:

{#block-yui_3_17_2_1_1696896549515_2160 font-family: 'Signatie';
}

This has lots of problems. Try this:

#block-yui_3_17_2_1_1696896549515_2160, #block-yui_3_17_2_1_1696896579340_2262, #block-yui_3_17_2_1_1696896579340_4400 {
  h1 {
     font-family: 'Signatie';
  }
}

It may not be correct since I'm not viewing your website and don't have all of the code in Custom CSS you are using. 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.