Jump to content

Changing Background Color On Hovering Gallery

Recommended Posts


I'm currently working on a website for my client. She would like the background color to change upon hovering over a gallery. 

Here's the page I'd like to apply the customization to: https://www.lovelyinlace.me/choose-your-studio-v2

It will be within the homepage index as she's on Squarespace 7.0.


Is there a custom CSS code that can change the background color of the page section upon hovering over the second gallery? Really appreciate any help with this, Thanks!




Link to comment
  • Replies 7
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

The issue here is, I think, if I understand the desired effect, is that there is no way with CSS alone to hover over the gallery and effect the styling of a ancestor element. In this case the element that has the background color.

You would need JavaScript to detect the hover over gallery and then set a class higher up in the chain to get the effect.

This would require the business plan or above and of course the JavaScript code to be written. I know of no code that does this.


Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.