Jump to content

Text color change when hovering over image

Go to solution Solved by tuanphan,

Recommended Posts


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


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? 



And more something like this:



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.