lightbox.js
lightbox.js copied to clipboard
Images being cut off by caption
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:
The CSS classes passed to lightboxImgClass
are applied, but I'm finding it difficult to control the placement of the image through that because
- there are inline styles controlling the width and height of the image (see the screenshot below)
- 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)
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!