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

Greeting, it's 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, Keyword Highlighter
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

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.