Jump to content

Hover animation on image, not the block

Recommended Posts

I am currently trying to add a hover animation to an image block (see yellow outline) and I am trying to make it outline the image, not the block that's wrapping it.

Any class or id near the image that I've tried removes the hover effect overall.

How can I get the image to be hovered and not the block? 

 

Here is my code:

#block-yui_3_17_2_1_1708718969724_44647:hover {
  outline: 2px solid yellow !important;
}

 

I have tried outline and border (since the image doesn't currently have a border). TIA!

image.png.be0efd3aa50c6f482081f0bc4bbe78d6.png

Link to comment
  • Replies 4
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

On 3/2/2024 at 12:49 AM, tuanphan said:

Something like this?

image.png.54e2a8c2aff1db32cf33544220732223.png

I'm sorry, it would actually be image down below. The top 6 items was me trying to create it via squarespace assets, and I ended up not liking how it looks so I was going to import as image (which is down below and currently has a hover animation around the block). 

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.