XF 2.3 Automatic limitation of the height of the images in threads

Capturimage

Member
Hello, :)

I have a forum about photography and, if the images in threads are automaticaly resized when you reduce the width of the browser, this is not the same for the height (make sens). So we needed to limit the height of the images displayed.

Before Xenforo 2.3, I used this code in my extra_less :


Code:
/* limit the size of images in threads */

.message-body img
{
max-height: 1100px !important;
}

It doesn't work anymore and the aspect ratio of the images displayed in a thread is not respected as it was with Xenforo 2.2.15. I asked to myself if it's not related to the new lightbox as the images (external host) over 1100 pixels used to open in it when you clicked on them.

Any idea? :unsure:
 
Last edited:
Solution
Forget it, I have found the solution :

Code:
/* limit the size of images in threads */

.message-body img
{
max-height: 1100px !important;
width: auto;
}
Back
Top Bottom