Jump to content

Dynamically resizing slideshow image container using Javascript so caption properly displayed below each image.

Recommended Posts

I have a fairly heavily CSS edited page 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 since it seems 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.  

Ideally the gallery container should resize based on each images specific width and height and I am fairly sure this cannot be fixed with CSS and requires Javascript.  

Any ideas on how to resolve this?

 Website URL

Edited by grantwesthoff
URL insert
Link to comment
  • Replies 2
  • Views 558
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

16 hours ago, grantwesthoff said:

I have a fairly heavily CSS edited page 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 since it seems 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.  

Ideally the gallery container should resize based on each images specific width and height and I am fairly sure this cannot be fixed with CSS and requires Javascript.  

Any ideas on how to resolve this?

 Website URL

Can you share the screenshots of images which are not correct as you expect?

Press 👍  or mark my comment as solution if you find my sharing useful

🆒 Squarespace pinchzoom lightbox plugin (affiliate link)

👁‍🗨 360 degree photo viewer (affiliate link)

Link to comment
Posted (edited)
19 hours ago, grantwesthoff said:

I have a fairly heavily CSS edited page 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 since it seems 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.  

Ideally the gallery container should resize based on each images specific width and height and I am fairly sure this cannot be fixed with CSS and requires Javascript.  

Any ideas on how to resolve this?

@HoaLT Sure can! 
image.thumb.png.9180d5ce42e782fc1f8f18442e910212.png

 

image.thumb.png.b077acba50aded06ee1b2a488255f763.png

As you can see, there is a drastic differences between the image's bottom border and the caption.  I'd like the caption to dynamically move to "stick" to the bottom of each image.  

Also a bonus would be applying a similar resizing behavior to the slideshow controls so on the vertical images they move to have a similar padding between the image and the controls.

Edited by grantwesthoff
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.