Jump to content

Trying to get box shadow behind Images set to Fit in CSS

Recommended Posts

Hi there, I'm trying to get all the images in a section to have a box shadow without having to do individual block IDs (the images will change frequently so I'm not sure if the block ID will change with the new image?)

This is the code I have that will add box shadow to the whole image block

section[data-section-id="66b3c81ba6970b6f0c5b0778"]   .image-block  {
  box-shadow: 0px 0px 5px #e2e2e2;
}

 

When I add -wrapper to it the shadow disappears:

section[data-section-id="66b3c81ba6970b6f0c5b0778"]   .image-block-wrapper  {
  box-shadow: 0px 0px 5px #e2e2e2;
}

 

Screenshot 2024-08-07 at 12.52.53 PM.png

Screenshot 2024-08-07 at 12.53.14 PM.png

Link to comment
  • Replies 2
  • Views 710
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

11 hours ago, kimmydesign said:

the images will change frequently so I'm not sure if the block ID will change with the new image?

If you delete the image block and add a new one, that will have a different ID, if you replace the image inside the block settings the block ID remains unchanged.

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?

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.