• Resolved 123tomek

    (@123tomek)


    How to change height of images in mla_gallery? When screen size is lower than image size from galery I want auto resize it to fit on screen but I don’t know how. I found css style=”height:50vh but how use it with mla_gallery?
    Is possible to use height in mla_gallery command?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question, which has come up in different ways several times before.

    Galleries generated by [mla_gallery] include class attributes that help you apply CSS styles to each gallery element. Formatting can be customized by defining CSS styles in your theme’s stylesheet(s) or in the post/page where the gallery appears.

    However, I regret that I have never found a solution for adjusting the height of an image dynamically to fit the browser window in which it appears. There are many techniques for adjusting width but I have not found corresponding techniques for adjusting height.

    You could, of course, use some JavaScript code to achieve your goal.

    I regret the news is not better, but I am marking this topic resolved simply because I have answered the question to the best of my ability. If you find a solution I encourage you to post it here so I and other MLA users can benefit from your discovery. Thanks for your understanding and for your interest in the plugin.

    Thread Starter 123tomek

    (@123tomek)

    I need this in all galleries on WP and I set max-height: 80vh to style.css of my theme.

    .gallery img {
    border: 10px solid #f1f1f1;
    max-height: 80vh;
    width:auto;
    }

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Height in mla_gallery’ is closed to new replies.