Jump to content

Custom css doesn't apply properly to my site

Go to solution Solved by Beyondspace,

Recommended Posts

Site URL: https://talshait.com/

Hi 🙂
I made a custom css for image swap on hover like this video: https://youtu.be/7WC906n4t5c.

Here is the code I used 

.image-swap img:nth-child(1) {
  position: absolute;
  transition: .5s;
}

.image-swap img:nth-child(1):hover {
  opacity:0;
}

 

In the edit page it's looking great! But in my website the top image is bigger then the bottom image (https://talshait.com/work/color).

Here is my video screenshot: https://youtu.be/Hvf7Re0VGKQ

 

I would appreciate any help

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

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution
2 hours ago, Tal121 said:

Site URL: https://talshait.com/

Hi 🙂
I made a custom css for image swap on hover like this video: https://youtu.be/7WC906n4t5c.

Here is the code I used 

.image-swap img:nth-child(1) {
  position: absolute;
  transition: .5s;
}

.image-swap img:nth-child(1):hover {
  opacity:0;
}

 

In the edit page it's looking great! But in my website the top image is bigger then the bottom image (https://talshait.com/work/color).

Here is my video screenshot: https://youtu.be/Hvf7Re0VGKQ

 

I would appreciate any help

Try adding to Home > Design > Custom Css

.image-swap {
  position: relative;
}

Let me know how it works on your site

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

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.