I'm facing an issue with my note-taking app where, in a grid layout, short notes leave empty space. How can I push the cards below to move up and stick to the top card? I am currently using Bootstrap's grid layout for displaying the cards. You can find more information about it here.
I have attached a screenshot showing how the cards currently appear: https://i.sstatic.net/HlppU.png
You'll notice there is a gap between the cards that I would like to fill up.
Here is the template for a single card:
let cardTemplate = `
<div class="col-sm-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">${title.value}</h5>
<p class="card-text">
${content.value}
</p>
<a href="#" class="btn btn-outline-primary showBtn">Show More</a>
<a href="#" class="btn btn-outline-danger deleteBtn">Delete</a>
<a href="#" class="btn btn-outline-success editBtn">Edit</a>
</div>
</div>
</div>`;
This card template is inserted into a div whenever a button is clicked.
<!--displaying notes-->
<div class="row"></div>
I haven't styled the div as I like its current appearance. Thank you for taking the time to read my query!