Nightman
Nightman

Reputation: 13

Dynamically resizing Squarespace's Gallery section to each images width and height using Javascript

I have a Squarespace site with a decent amount of custom CSS edits focused on simplifying (visually) the slideshow gallery. I have it mostly set up as I'd like except the captions do not anchor to the bottom of the images with a consistent spacing on all images. Chrome's dev mode seems to show the container div's width and height are set in the HTML style tag based on the max-width/height of the list of images contained in the slideshow. As far as I can tell this requires a JS approach since Squarespace's CSS inject can't target the in-line html style.

My goal is for the gallery container to resize based on each images specific width and height so the caption placement is close to the image and consistent across all images.

Any ideas on how to resolve this?

Website URL

The caption spacing issue is most obvious on very tall or very wide viewports.

Upvotes: 1

Views: 217

Answers (0)

Related Questions