Jump to content

Image zoom on hover

Go to solution Solved by Ziggy,

Recommended Posts

Hello 🙂 

I'd like to have an effect on a few images in a section of a page on my website. But I can't find the error in the code found on youtube tutorials. 

Here's a screenshot of the code: 

Thanks in advance for your help 😄

Capture d’écran 2024-09-02 à 15.26.34.png

Link to comment
  • Replies 4
  • Views 149
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

You've got the closing square bracket from the section ID in the wrong place, move it as here:

image.png.83df74b0b958735deb29f123a1fcd1b6.png

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

It doesn't work like this but i found an other code and it's working actually with : 

<style> 
  section[data-section-id="66c4b670708ce031195e5a92"] {
  .sqs-block-image img {
    transform: scale(1);
    transition: 400ms;
    overflow:hidden !important;
  }
  .sqs-block-image:hover img {
     transform: scale(1.1); 
     transition: 400ms; 
  }
}
</style>


 
 

 

Capture d’écran 2024-09-02 à 17.51.33.png

Link to comment
  • Solution

This time you're missing a round bracket here:

image.png.07493ce4bb25f74b6555f64c5fc97427.png

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!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ 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.