I have a 3 column grid, of different widths, which contain an image element each.
The structure is essentially
<div class="row">
<div class="col-3"><img></div>
<div class="col-6"><img></div>
<div class="col-3"><img></div>
</div>
Each image is set to:
img {
display:block;
max-width: 100%;
height: auto;
}
Each column also contains padding-left and padding-right of 15px;
This however causes the middle col-6 column to be taller than the other two columns in the row.
I have tried to double the left- and right-padding for the longer the col-6 column but I don't think this is ideal and also does not work responsively.
I have also tried using flexbox to no avail.
What is the best solution to keep all images the same height and still work responsively?