Jump to content

Exclude a block from box-shadow CSS

Recommended Posts

I'm using code blocks to build the home page of my portfolio and I'm wondering if there's a way to exclude certain blocks from the CSS I've applied, namely, a drop shadow to images. I've tried the following on the hero image which I want to exclude from the shadow effect:

.no-shadow img {
    box-shadow: none !important;
}

but that doesn't work. Any help would be greatly appreciated!

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

Thanks for replying! I haven't launched my site yet, so the URL is currently https://dalmatian-crane-a5wn.squarespace.com/ and it's the hero image (my name).

I actually figured out how to exclude it from the shadow— I was just missing div tags around the img tags!

 

For reference, here's what I used:

<div class="no-shadow"> [my img tag]</div>

(in addition to the "no-shadow" declaration I mentioned in my original post)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.