I'm displaying images in a grid for a photography website using bootstrap.
Bootstrap takes care of displaying all pictures with the same width. However, I need to find a way to limit the height of vertical pictures to that of their horizontal peers.
The result should be that vertical pictures are cropped into horizontal pictures when displayed in the grid.
I'm using this code to display the images:
<div class="col-xs-12 col-sm-4 col-md-3">
<a href="img/picture-1.jpg" data-lightbox="gallery"><img class="img-responsive" src="img/picture-1.jpg"></a>
</div>
or, alternatively:
<a class="col-xs-12 col-sm-4 col-md-3" href="img/picture-1.jpg" data-lightbox="gallery"><img class="img-responsive" src="img/picture-1.jpg"></a>
I'm tried with fixed width and height pixel value, but to no avail.