Jump to content

Text color change when hovering over image

Go to solution Solved by tuanphan,

Recommended Posts

Hello!

I choose to have a hovering animation for my portfolio categories so it could be more fun and dynamic, but the problem is that the color does not change once the image appears behind it. In some cases it's not bothering me, but in others the text just isn't readable. I tried to add a personalized CSS code, but I must admit that I'm not really a coder and nothing has worked yet. Is it possible to change the color of the text when it's hovering over the image? What would be the best for contrast would be a difference effect on the text, but I don't know if that's possible.

Please let me know!

Thank you ☺️ 

Capture d’écran 2023-10-12 à 15.07.49.png

Capture d’écran 2023-10-12 à 22.41.55.png

Capture d’écran 2023-10-12 à 22.42.40.png

image.png

Edited by Walush
Link to comment
  • Replies 4
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

35 minutes ago, tuanphan said:

Try adding to Website Tools (under Not Linked) > Custom CSS

a.portfolio-hover-item[data-active="true"] * {
    color: white !important;
}

 

It worked, thank you so much!

Though, I'm having another issue : when the text is longer than the photo, the part of the text which is not hovering appears white too, making it unreadable on the white background. Is there a possibility to code the text to interact only on the part on the photo? 

Now:

Capturedecran2023-10-19a12_52_11.thumb.png.6330e21a132071257950ca6dd55638a6.png

And more something like this:

Capturedecran2023-10-19a12_52.11copie.thumb.jpg.10f13b6b22b34ddb0aeb62f15a873ab8.jpg

 

Thank you!!

Edited by Walush
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.