Jump to content

How do target a class inside a specific div

Recommended Posts

Site URL: https://instoreexperience.com/ourproducts

Im trying to make hover states on a gallery grid, but the only way I can get it to work is:

  opacity: .5 !important;


The issue is I use gallery grid images throughout the site. Ideally id like to just target the gallery class inside the div, but that wasnt working for me. I was trying:

  opacity: .5 !important;}

Any idea the proper way of doing this?

Link to comment

If I understand correctly you are trying to apply your effect to images of particular galleries.

One way to target your gallery is the following.

[data-section-id="6138dc007192cb11bb8c2a7b"] .gallery-grid-item:hover {

  opacity : 0.5;

This is for a v7.1 and specific to the posters need.

To find data section ids check out Heather Tovey's most excellent looking Squarespace ID Finder.

Let us know how it goes.

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.