Lightbox image size 2

Hi!

I used this code to added lightbox feature in image using raw content element.

[x_image class="my-image" src="http://yourdomain.com/image.jpg" alt="Example" type="thumbnail" link="true" href="http://yourdomain.com/image.jpg" title="Example Image"][x_lightbox selector=".my-image" opacity="0.875"]

However the lightbox opens in a “zoomed-in” mode with no scroll option. How do I restrict the height of lightbox to 100% so that it doesn’t cross the top of the screen?

Hello Malav,

Thanks for writing in!

You will need to add this custom CSS to your code above:

.ilightbox-holder.light {
    max-height: 100vh;
    top: 0 !important;
}

Be advised that custom CSS coding is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

We highly recommend that you change the Modal element instead. This is to have full control over the Modal and the Image element inside it. If you can give us access to the site, we would be happy to create a demo example for you. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.