Jump to content

How to insert a drop cap on every blog post automatically for the first paragraph?

Go to solution Solved by Ziggy,

Recommended Posts

Add this to advanced -> blog post item code injection on the blog page settings in question:

<style>
p:first-child:first-letter {
  float: left;
  line-height: 120%;
  width: 1em;
  font-size: 350%;
}
</style>

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
On 9/5/2023 at 10:29 AM, Ziggy said:

Add this to advanced -> blog post item code injection on the blog page settings in question:

<style>
p:first-child:first-letter {
  float: left;
  line-height: 120%;
  width: 1em;
  font-size: 350%;
}
</style>

The code worked, kind of. The code capitalised a P2 style too, which you can see in the photo. I should've said, I need it to target only P1 style.

 

Screenshot 2023-09-07 at 10.53.44.png

Screenshot 2023-09-07 at 10.53.39.png

Edited by johnpaulstuthridge
Specificity.
Link to comment

Can you share your website URL?

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • Solution

P1 has the selector: p.sqsrte-large

Try this:

<style>
p.sqsrte-large:first-child:first-letter {
  float: left;
  line-height: 120%;
  width: 1em;
  font-size: 350%;
}
</style>

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

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.