Jump to content

Changing overlay color on hover for different images

Go to solution Solved by Beyondspace,

Recommended Posts

Posted (edited)

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
  • Solution
Posted
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 - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

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

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.