Jump to content

Image Hover Code Stopped Working

Go to solution Solved by tuanphan,

Recommended Posts

Hi all,

A bit of a mystery for you all.  I've had code to zoom in on a few homepage images on hover for over a month. It suddenly stopped working today without any code having been edited this week.  I'm hoping that someone can help point me in the right direction as I've been troubleshooting this for over an hour. 

I'm wondering if something changed on Squarespace's side?  I've removed all custom code with the exception of this just to make sure nothing else isn't interfering, and that didn't seem to help.  It just stopped working.

Here's the website: https://www.uniqueromancetravel.com/

The following code is applied to the image in the attached screenshot, but there are instances of the code for all three of the travel areas listed on the homepage.

// Zoom In Hover - Dest Weddings //
#block-yui_3_17_2_1_1659657576382_1215218 {
.sqs-block-image .design-layout-inline:hover img {transform:scale (1.1) !important; transition: all ease-in-out 1.5s !important;} 
}
#block-yui_3_17_2_1_1659657576382_1215218 {
img:hover {transform: scale(1.1); transition: 1s !important;}
  img{transform: scale(1); transition: .4s !important;}}

Any help would be appreciated!  Thank you!

Best,
-Scott

 

Screenshot 2022-12-01 at 3.58.39 PM.png

Link to comment

Thanks @tuanphan for the speedy reply!

 

This was actually always a fluid engine section and the code worked fine up until today/this week, so that just adds a bit more to the mystery.

I changed the code to now have .design-layout-fluid instead of .design-layout-inline, but this still isn't working, unfortunately (it now reads as the below).  I'm wondering if Squarespace changed something else I'm not aware of?

 

// Zoom In Hover - Dest Weddings //
#block-yui_3_17_2_1_1659657576382_1215218 {
.sqs-block-image .design-layout-fluid:hover img {transform:scale (1.1) !important; transition: all ease-in-out 1.5s !important;} 
}
#block-yui_3_17_2_1_1659657576382_1215218 {
img:hover {transform: scale(1.1); transition: 1s !important;}
  img{transform: scale(1); transition: .4s !important;}
}

Link to comment

@manuschuster I figured it out - feel free to use the code below if you're using a fluid engine section.  This should work -

 

#BLOCK-NUMBER-HERE
{.design-layout-fluid img {
  transform: scale(1) !important;
  transition: all ease-in-out 1s !important;
  }}
#BLOCK-NUMBER-HERE {
.design-layout-fluid:hover img {
  transform: scale(1.1) !important;
  transition: all ease-in-out 1s !important;
  }}

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.