How to adjust bootstrap 3 thumbnails to occupy empty spaces?

Viewed 32

This is my code. I am using express.js. this is ejs file. the snapshot of code below is this enter image description here

<%- include ("../partials/header") %>

    <div class="container">
        <header class="jumbotron">
            <div class="container">
                <h1>Welcome To YelpCamp!</h1>
                <p>View our hand-picked campgrounds from all over the world</p>
                <p>
                    <a class="btn btn-lg btn-primary" href="/campgrounds/new">Add new Campground </a>
                </p>
            </div>
        </header>
    

        <div class="row" style="display:flex; flex-wrap:wrap;">
            <% campgrounds.forEach(function(campground){ %>
                <div class="col-md-3 col-sm-6">
                    <div class="thumbnail">
                        <img src="<%= campground.image %>">  
                        <div class="caption">
                            <h4> <%= campground.name %> </h4> 
                        </div>
                        <p>
                            <a href="/campgrounds/<%= campground._id %>" class="btn btn-primary">More Info</a>
                        </p>
                    </div>
                </div>
            <% }); %>
        </div>
    </div>


<%- include ("../partials/footer") %>

I want to adjust thumbnails to occupy empty spaces in between as it is looking hideous. is there any way to do that using bootstrap 3 ( I have also marked in image please refer the image) Any help is appreciated..

1 Answers

What is the height of that largest thumbnail in the row?

Set the thumbnail class to be that height always

.thumbnail{
   width:250px;
   height:600px !important;
}
Related