Jump to content

7.1 Caption on Hover - Gallery Simple

Recommended Posts

  • Replies 4
  • Views 954
  • Created
  • Last Reply
Posted
1 hour ago, designbyamber said:

Site URL: https://sturgeon-bamboo-52ac.squarespace.com/portfolio

https://sturgeon-bamboo-52ac.squarespace.com/portfolio

I would like to have a caption show when someone hovers over an image, with an overlay as well. Is this possible?

You can try

.gallery-grid-item {
  position: relative;
}

.gallery-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-grid-item-wrapper:after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
}

.gallery-grid-item:hover .gallery-grid-item-wrapper:after {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-grid-item:hover .gallery-caption {
  opacity: 1;
}

Let me know how it works on your site

Press 👍 or mark this answer as solution to help another one too

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Posted

At the my moment, it works on my testing, have you added my codes?

 

 

About the text, have you turned on the caption of gallery? I can not find it now

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.