Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Custom css doesn't apply properly to my site


Tal121

Question

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
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

2 answers to this question

Recommended Posts

  • 0
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

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for Squarespace
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0
6 hours ago, bangank36 said:

Try adding to Home > Design > Custom Css

.image-swap {
  position: relative;
}

Let me know how it works on your site

Thank you!!!
Appreciate a lot 🙂

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