TaeReid Posted October 30, 2023 Posted October 30, 2023 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.
Solution JayVanDyke Posted October 30, 2023 Solution Posted October 30, 2023 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
TaeReid Posted October 30, 2023 Author Posted October 30, 2023 @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.
JayVanDyke Posted October 30, 2023 Posted October 30, 2023 @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
TaeReid Posted October 30, 2023 Author Posted October 30, 2023 @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?
JayVanDyke Posted October 30, 2023 Posted October 30, 2023 It would look basically the same without the style tags #collection-XXXXXXXXXXXX .image-block { filter: drop-shadow(5px 5px 8px #d3d3d3); } ☕ 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment