Solved
How to fix the displayed height of a loop & merge image?

Hello. My survey has a block in which subjects answer a two-choice question about a loop & merge image. I need all the images to be displayed with the same height dimension, but the images have different aspect ratios, so the width should be scaled in proportion to the height. In the HTML field of the loop & merge question, I have tried:
<img src="${lm://Field/1}" style=“height:300;”>
<img src="${lm://Field/1}" style="width:auto;height:300;”>
<img src="${lm://Field/1}" height=“300”;>
These do not seem to change the way the images are displayed., However, confusingly, if I switch the words “height” and “width” these methods work perfectly well to fix the width of the images. Any ideas on how I can fix the height dimension of my images?
(Also, applying a CSS class to the img HTML tag did not work, either.)
Thanks!
Best answer by TomG
Set the min and/or max heights, and you don't need to set width:
```
<img src="${lm://Field/1}" style="max-height:300px;min-height:300px”>
```
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.