Jump to content

Hovering captions in centre of image without cropping with dark overly

Recommended Posts

Posted

Site URL: https://www.timkentphotographer.com/

I'm struggling to add hover over captions with a dark background to the centre of my images. Have only managed to get them at the bottom of the image. When changing the amounts to move it further up the image to the centre it crops the photo. This is on  a simple gallery. 

I have attached an example of what mine looks like and what I'd 'd like it to look like.

Current code I''m using is below:  

.gallery-caption p{text-align:center} 

.gallery-caption p{font-size:0.8rem!important}

.gallery-caption p{font-family:pragmatica-extended!important}

.gallery-caption {margin-top: -15%} 

.gallery-caption {opacity:0!important}

.gallery-grid-item:hover 

.gallery-caption {opacity:1!important; transition-duration:0s}

.gallery-grid-item {opacity: 1;filter: alpha(opacity=40);}

img:hover {opacity: 0.4;filter: alpha(opacity=100)}

Screenshot 2021-01-11 at 15.40.06.png

Screenshot 2021-01-11 at 15.40.22.png

  • Replies 5
  • Views 366
  • Created
  • Last Reply

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.