Can anyone help me with styling a gallery using Bootstrap and Flexbox? I want to have one large image next to two smaller stacked images, all of which need to be the same height.
The container columns are maintaining the same height, but I'm having trouble getting the img
elements within the column to fill the height of the container.
I managed to make it work in Firefox by using height: 100%
on the img
, but this solution doesn't work in Chrome and Safari.
img {
max-width: 100%;
width: auto\9;
height: auto;
vertical-align: middle;
border: 0;
-ms-interpolation-mode: bicubic;
}
figure {
margin-bottom: 0;
}
.rts-col {
margin-bottom: 30px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="rts-col col-8">
<figure>
<img src="http://via.placeholder.com/1400x933">
</figure>
</div>
<div class="rts-col col-4">
<figure style="margin-bottom: 30px;">
<img src="http://via.placeholder.com/1400x933">
</figure>
<figure>
<img src="http://via.placeholder.com/1400x933">
</figure>
</div>
</div>
</div>
For more details and code snippets, you can visit my JSFiddle link: https://jsfiddle.net/tylorreimer/q8qe5p80/2/