I am looking to create a gallery where the thumbnails have equal height along the main column, even though the images are different heights.
I attempted to wrap each picture in a <div>
and set the height on them, but I did not achieve the desired result.
Any suggestions?
/* PLEASE see the snippet in Full size */
.gallery .gal-ver .gal-ver-border {
border: 1px solid #707070;
border-radius: 10px;
margin-top: 5px;
margin-bottom: 5px;
display: flex;
}
.gallery .gal-ver img {
width: 100%;
height: auto;
border-radius: 10px;
display: block;
padding: 5px;
}
.gallery .imgWrap {
display: flex;
justify-content: center;
align-items: center;
border: 1px solid #707070;
border-radius: 15px;
}
.gallery .mainimg {
width: 100%;
height: auto;
border-radius: 10px;
margin: 15px 10px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="14767b7b60676066756454213a263a24397671607525">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<title>[product-name]</title>
</head>
<body>
<div class="gallery d-flex">
<div class="gal-ver">
<div class="gal-ver-border"><img src="https://www.ubuy.vn/productimg/?image=aHR0cHM6Ly9tLm1lZGlhLWFtYXpvbi5jb20vaW1hZ2VzL0kvNzFCc0xFam55WkwuX0FDX1NMMTUwMF8uanBn.jpg"></div>
<div class="gal-ver-border"><img src="https://www.ubuy.com.tr/productimg/?image=aHR0cHM6Ly9tLm1lZGlhLWFtYXpvbi5jb20vaW1hZ2VzL0kvNzFXRHR5dlFOcEwuX0FDX1NMMTUwMF8uanBn.jpg"></div>
<div class="gal-ver-border"><img src="https://m.media-amazon.com/images/I/91iLajROOwL._AC_SX466_.jpg"></div>
<div class="gal-ver-border"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSRyT92TMIDrrkzvlOOpKbTiKcC_iCuhWTvKg&usqp=CAU"></div>
<div class="gal-ver-border"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQZH5HdCYBQm1-WQic_m7LtfC_G1owr2oakQ&usqp=CAU"></div>
</div>
<div class="col-md-12 col-lg-9 imgWrap">
<img src="https://www.ubuy.vn/productimg/?image=aHR0cHM6Ly9tLm1lZGlhLWFtYXpvbi5jb20vaW1hZ2VzL0kvNzFCc0xFam55WkwuX0FDX1NMMTUwMF8uanBn.jpg" class="mainimg">
</div>
</div>