This section was designed using Bootstrap and displayed as flex. However, some items seem to have extra space:
My goal now is to remove the extra space underneath the items like this:
Smaller items will now be resized to match the larger items, eliminating the excessive space.
#portfolid {
padding: 60px 0;
}
#portfolid .portfolid-item {
margin-bottom: 30px;
height: 100%;
align-items: center;
}
#portfolid .portfolid-item .portfolid-overlay {
position: absolute;
bottom: -25px;
width: 90%;
height: 85px;
right: 20px;
left: 20px;
background-color: rgba(255, 255, 255, .9);
padding: 15px;
opacity: 0;
visibility: hidden;
transition: all .4s ease-in-out;
}
#portfolid .portfolid-item:hover .portfolid-overlay {
bottom: 15px;
opacity: 1;
visibility: visible;
}
<!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">
<title>Portfolid</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjVERJvTumQW0nPEzvF6L/Z6nronJUOFUFpCjEUQouq2+l" crossorigin="anonymous">
</head>
<body>
<!-- Portfolid -->
<section id="portfolid">
<div class="container">
<div class="row">
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 app">
<img src="https://s4.uupload.ir/files/portfolio-1_j0pd.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 web">
<img src="https://s4.uupload.ir/files/portfolio-2_4m83.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 app">
<img src="https://s4.uupload.ir/files/portfolio-3_xdlg.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 app">
<img src="https://s4.uupload.ir/files/portfolio-4_4ogv.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 web">
<img src="https://s4.uupload.ir/files/portfolio-5_l6n.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 cart">
<img src="https://s4.uupload.ir/files/portfolio-6_694s.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 cart">
<img src="https://s4.uupload.ir/files/portfolio-7_oxqo.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 web">
<img src="https://s4.uupload.ir/files/portfolio-8_xn4.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
<div class="portfolid-item col-lg-4 col-md-6 col-sm-12 cart">
<img src="https://s4.uupload.ir/files/portfolio-9_xqw3.jpg" alt="" style="width: 100%;">
<div class="portfolid-overlay">
<div class="row">
<!-- content -->
</div>
</div>
</div>
</div>
</div>
</section>
</body>
</html>