Jump to content

Can't apply CSS for Drop Shadows to a single page, it's only showing up if added to the full website CSS edits, how do I get it to work on the single page?

Go to solution Solved by JayVanDyke,

Recommended Posts

Posted

I have this custom code for Drop Shadows: .image-block {filter: drop-shadow(5px 5px 8px #d3d3d3);}

It works for the entire site when applied as a custom CSS in the Website Tools, however I only want it applied on a single page. When adding to the Advance custom CSS for the specific page, the effect does not show up.

  • Replies 5
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

  • Solution
Posted

You can add it to the page header code injection just for that page but it needs html tags like this

<style>
  .image-block {filter: drop-shadow(5px 5px 8px #d3d3d3);}
</style>

Also you could use the Squarespace ID finder chrome extension and find out the page collection id, usually starts with a "#collection" and add that before your .image-block part in your regular css panel.

https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff

  Did I help you? Buy me a coffee!

👨‍💻 Bergen Design Co.

💻  I'm for hire on Upwork!

🕸️ Squarespace Experts  

🖥️ 99Designs

 🛠️ Web Designer's Toolkit

**some of these contain affiliate links

Posted

@jaeveedee Thank you! That worked. I was hoping to add it to just that page, so I didn't have to worry about it showing up on future pages my client adds. Amazing it's just adding the <style> to it on a specific page. Just curious, if there's an easy explanation as to why it's different at the page level, vs the whole site level of code? Really appreciate the help. 

Posted

@TaeReid It's not any different than any code injection area in your site. The Custom CSS panel however is a LESS preprocessor so you just write up your css in there and SS does the work to translate into regular CSS and minify. I honestly wouldn't use the page header code injection with style tags as the way to do this as a best practice if you're giving it to a client. Finding the page collection id and adding it to CSS makes it so that if someone else ever takes over managing or customizing the site they don't have to go tracking down your code. Everything is within that custom css panel and easy to find.

  Did I help you? Buy me a coffee!

👨‍💻 Bergen Design Co.

💻  I'm for hire on Upwork!

🕸️ Squarespace Experts  

🖥️ 99Designs

 🛠️ Web Designer's Toolkit

**some of these contain affiliate links

Posted

@jaeveedee Okay, that's good to know. I'm not sure if she'll be updated ONLY this page so keeping it on the page might be best for her. If I was to add this to the overall Website Tool CSS section, what would the code look like for adding the drop shadow to only that Page (assuming I have the page ID and located that) could you share a code with a hypothetical page id in place?

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.