"Grid maxmin"
Bootstrap 4.1.1 Snippet by SANTANU CHOWDHURY

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container-fluid"> <div class="image-card"> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> <div> <div class="image-card__image-area"> <img src="https://placehold.co/600x400"></img> </div> <div class="image-card__details"> <div>image-name.jpg</div> </div> </div> </div> </div>
.image-card{ display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; padding: 0px 10px; /* display: none; */ } .image-card > div{ flex-basis: 200px; flex-grow: 1; min-height: 200px; border: 1px solid #ddd; text-align: center; border-radius: 10px; } .image-card__image-area img{ width: 100%; height: 200px; object-fit: cover; border-top-left-radius: 10px; border-top-right-radius: 10px; } .image-card__details{ padding: 10px 5px 12px; }

Related: See More


Questions / Comments: