Jump to content

Changing overlay color on hover for different images

Go to solution Solved by Beyondspace,

Recommended Posts

I'm trying to sort out the CSS that will allow me to change the overlay color of individual images. On my home page I'd like each of project to have a different color when you hover over it. Currently the overlay is white for all images.

I imagine it's a simple piece of code, but I haven't been able to figure this one out.

Thanks for any help! Link to my site below.
 

https://www.astnmrtn.com/

Edited by astn_mrtn
Link to comment
  • Solution
6 hours ago, astn_mrtn said:

I'm trying to sort out the CSS that will allow me to change the overlay color of individual images. On my home page I'd like each of project to have a different color when you hover over it. Currently the overlay is white for all images.

I imagine it's a simple piece of code, but I haven't been able to figure this one out.

Thanks for any help! Link to my site below.
 

https://www.astnmrtn.com/

Try adding to Home > Design > Custom Css

section[data-section-id="6373bc904b5f15018776d1b3"] .portfolio-grid-overlay .grid-item:nth-child(1) .portfolio-overlay {
  background-color: red; 
}


section[data-section-id="6373bc904b5f15018776d1b3"] .portfolio-grid-overlay .grid-item:nth-child(2) .portfolio-overlay {
  background-color: blue;
}

Here is the code for setting overlay color for the first and the second item

Support me by pressing 👍  or marking as solution if this useful for you

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

My testing

image.thumb.png.555621e39545e4473b3d1c30c4ea891d.png

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
18 hours ago, Beyondspace said:

Try adding to Home > Design > Custom Css

section[data-section-id="6373bc904b5f15018776d1b3"] .portfolio-grid-overlay .grid-item:nth-child(1) .portfolio-overlay {
  background-color: red; 
}


section[data-section-id="6373bc904b5f15018776d1b3"] .portfolio-grid-overlay .grid-item:nth-child(2) .portfolio-overlay {
  background-color: blue;
}

Here is the code for setting overlay color for the first and the second item

Support me by pressing 👍  or marking as solution if this useful for you

Thank you so much! Exactly what I was looking for. I really appreciate it.

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.