'Fix image height in Cargo Collective image gallery
I'm working on a Cargo Collective site for a friend and am somewhat perplexed by the CSS editor and its inability to fix the image height for all images in the gallery.
What I want
Image gallery changes its width to fit an image's full height, e.g. this page will have the frog images as tall as the left image but not have the width cropped.
What I've done
This:
.gallery_card_image {
height: 100% !important;
}
Any tips go a long way
Solution 1:[1]
this is just a personal opinion: try to set a max-height of 200px plus the 100% height.
.gallery_card_image { max-height: 200px; height: 100%; }
hope this works! :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Roberto Fierro |

