lightbox.js icon indicating copy to clipboard operation
lightbox.js copied to clipboard

Images being cut off by caption

Open dandc11 opened this issue 11 months ago • 15 comments

Hi @silvia-odwyer,

I'm running into an issue with my images being cut off when captions are used. The overlay for the caption covers the bottom part of the image, and the images themselves are perhaps not ideally sized within the lightbox. There may be an existing way to deal with this, but I'm not able to determine from the documentation about the props. Please see below: image

The CSS classes passed to lightboxImgClass are applied, but I'm finding it difficult to control the placement of the image through that because

  1. there are inline styles controlling the width and height of the image (see the screenshot below)
  2. I can't get the style object I pass to captionStyle to take any effect (not sure what the expected syntax should be there, but I've tried numerous things)

image Ideally, I would like a way to keep my images in the center of the screen, keep them at no more than 80% of the viewport height, and have my captions display below. The captions would then not need to be foregrounded on an opaque overlay atop the image, but would alway show up below. Please let me know if there's a way to accomplish this. Thanks!

dandc11 avatar Mar 01 '24 14:03 dandc11