Jump to content

Gallery caption overlay Customisation

Recommended Posts

Posted

Site URL: https://giraffe-tuna-mkef.squarespace.com/config/pages/website-tools/custom-css

Heya.

I have added  the code below to enable text overlay to my gallery. However I was hoping to split the text into Titles and subtext, subtext 2. 

 

Can you help amend the code below to enable this. 

 

.gallery-grid-item {
  position: relative;
}
.gallery-caption.gallery-caption-grid-simple {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  color: #fff;
  pointer-events:none; 
}
.gallery-grid-item:hover .gallery-caption-grid-simple{
  opacity: 1;
}


.gallery-grid-item .gallery-grid-item-wrapper:after {
  content: '';
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: block;
  position: absolute;
  top:0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;

}

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

.gallery-caption.gallery-caption-grid-simple h3 {
  color: white;
}

 

CHEERS RACHEL

  • Replies 1
  • Views 178
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.