Jump to content

Exclude Footer from Code Injection

Recommended Posts

Site URL: https://pappalecco.squarespace.com/

Hello,

I inserted the code injection below to create Drop Caps on about page and it's affecting the footer area

I tried to add the code in page header and/or in the page itself as code injection BUT it creates drop caps on the footer area of the about page.

Is there a way to exclude the footer from the code?

page is https://pappalecco.squarespace.com/about

password: p

Thank you!

--------

Code used:

<style>p:first-letter{display:block; float: left;
margin-top: -2.5rem; margin-bottom: 0rem;
margin-right: 15px; font-size: 6rem;}</style>

Link to comment
4 hours ago, Fabrizio said:

Site URL: https://pappalecco.squarespace.com/

Hello,

I inserted the code injection below to create Drop Caps on about page and it's affecting the footer area

I tried to add the code in page header and/or in the page itself as code injection BUT it creates drop caps on the footer area of the about page.

Is there a way to exclude the footer from the code?

page is https://pappalecco.squarespace.com/about

password: p

Thank you!

--------

Code used:

<style>p:first-letter{display:block; float: left;
margin-top: -2.5rem; margin-bottom: 0rem;
margin-right: 15px; font-size: 6rem;}</style>

You could try this code snippet. This will only target paragraphs in the main page, excluding the header and footer. Paste this in the header of the relevant page.

<style>
  #page p:first-letter{display:block; float: left;
    margin-top: -2.5rem; margin-bottom: 0rem;
    margin-right: 15px; font-size: 6rem;}
</style>

 

Feel free to email me with any customization inquiries or questions you may have!

Free Squarespace Resources: DevTools Minicourse,  11-Step Guide to Improve Custom CSS, Free Product/Pricing Comparison Table Generator

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.