Any update Brajesh? This is a big piece for our group and I don’t want to miss the update. Thanks!
Hi Shannon,
I will need some more time before I can check the media query and post. I will do it early next week now.Regards
BrajeshHi Shannon,
Please use the following css and adjust the vh as needed.mpp-lightbox-with-comment-media-container .mpp-lightbox-single-photo img { max-height: 90vh; }
vh stands for viewport height.
Regards
BrajeshHmm. Still doesn’t seem to work. The portrait images are being scaled to fit width but are still scrolling off the screen.
A little more information… I can make the browser TALLER and nothing changes. The portrait image still scrolls off the screen. If I make my browser LESS WIDE, then the image resizes and fits in the container. If I make the browser WIDER, the image scales and then requires scrolling.
So it’s something to do with the width as well as the height. The viewport height is being ignored (even tried setting it to !important) and the width seems to be affecting whether or not portrait images are being scaled correctly.
Horizontal/landscape images seem to work just fine.
Got it! I realized the CSS wasn’t referencing correctly. Changed to this:
.mpp-lightbox-media-entry img, .mpp-lightbox-with-comment-media-entry img
{
height: 90vh!important;
}Thank you.
I was only targetting lightbox which had comment and media both. Your code targets both lightbox.
Also, adding !important will allow overriding with most of the themes. I was trying to avoid and using specificity which might not work in all setup.
I am glad it is resolved.
Regards
Brajesh
You must be logged in to reply to this topic.