Jump to content

Reveal text with hover on gallery

Recommended Posts

Hello, I am trying to tweak a code that I have that allows a text to appear when hovering on gallery images. the code I have works with lightbox mode on but whenever I add a link to where I want the user to be redirected to another page on the website the lightbox feature goes away. 

website: https://puma-seabass-xgn4.squarespace.com/

pass: alaina

on the art > modeling page you can see what I am saying when hovering over the first few images that show up. 


here is the code:

.gallery-grid-item {
  position: relative;

.gallery-grid-item:hover .gallery-grid-lightbox-link {
  background: #000; /* Keeping your original background setting */

.gallery-grid-item:hover .gallery-grid-lightbox-link img {
  opacity: 0.6;

.gallery-caption.gallery-caption-grid-simple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease; /* Smooth transition for opacity */

.gallery-grid-item:hover .gallery-caption-grid-simple {
  opacity: 1; /* Ensuring correct opacity on hover */

.gallery-caption-content {
  text-align: center;
  color: #fff;
  font-weight: bold; /* Making the font bold */
  font-size: 16px; /* Approximate size for an h4 header, adjust as needed */
p.gallery-caption-content {
    font-family: LTC-Bodoni-175 !important;
  font-size: 150% !important;
  font-weight: bold !important;

Link to comment
  • Replies 3
  • Views 412
  • Created
  • Last Reply

Top Posters In This Topic

On 5/6/2024 at 2:25 AM, bellamalia said:

so i just want it to to hover over so it can be dark and you can read the font and yes open to a new page. 

Currently I don't see gallery text. Can you enable it? Then I can check code easier.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.