Jump to content

Hide caption on masonry gallery view, show on lightbox

Recommended Posts

I am attempting to set up a portfolio site that presents a masonry gallery without captions, but the captions appear when the lightbox is open. I also want the captions to be links.

I have partially achieved this by hiding captions on the masonry grid, and showing them on lightbox. The trouble I am having now is that the padding around the caption is making it un-clickable in some instances.

The caption in the screenshot "Caption Link Working" is acting as I would like - when you hover over the text "View Project," the mouse pointer changes to a cursor and a link address appears in the lower left.

However, the screenshot "Caption Link Not Working" shows an image of a different aspect ratio, which seems to break the link. 

I would appreciate any help you can give.

Caption Link Not Working.png

Caption Link Working.png

Link to comment
  • Replies 7
  • Views 2.2k
  • Created
  • Last Reply

Top Posters In This Topic

@sarahgracestudio ok it looks like the gallery controls (the left/right arrows) are interfering with the caption, they are absolutely positioned on top, so they cover the link which is why you can't click it.

I suggest adjusting the position of the left/right arrows to only come down 50% of the height instead of 100% and then positioning at the bottom of the flexbox. They may not be exactly half the height of the page, but it will be close enough visually and fix your interference. So add this to your custom CSS:

.gallery-lightbox-controls {
	height: 50% !important;
	align-items: flex-end;
}

Let me know?

Link to comment
  • 3 months later...
  • 2 weeks later...

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.