I managed to get the current code working to showcase a grid of different recipes
<div class="mt-40">
<div class="recipe-cont cont mt-15 rounded left mr-15 mb-15">
<img src="data/2014121601/thumb.png" alt="thumbnail" class="rounded mt-5 ml-5">
</div>
<div class="recipe-cont cont mt-15 rounded left mr-15 mb-15">
<img src="data/2014121602/thumb.png" alt="thumbnail" class="rounded mt-5 ml-5">
</div>
<div class="recipe-cont cont mt-15 rounded left mr-15 mb-15">
<img src="data/2014121603/thumb.png" alt="thumbnail" class="rounded mt-5 ml-5">
</div>
<div class="recipe-cont cont mt-15 rounded left mr-15 mb-15 ">
<img src="data/2014121601/thumb.png" alt="thumbnail" class="rounded mt-5 ml-5">
</div>
<div class="recipe-cont cont mt-15 rounded left mr-15 mb-15 ">
<img src="data/2014121602/thumb.png" alt="thumbnail" class="rounded mt-5 ml-5">
</div>
<div class="recipe-cont cont mt-15 rounded left mr-15 mb-15">
<img src="data/2014121603/thumb.png" alt="thumbnail" class="rounded mt-5 ml-5">
</div>
<div class="recipe-cont cont mt-15 rounded left mr-15 mb-15">
<img src="data/2014121601/thumb.png" alt="thumbnail" class="rounded mt-5 ml-5">
</div>
</div>
.
.recipe-cont {
width: 180px;
height: 210px;
}
The displayed result resembles this:
My goal is to achieve the following design:
The issue I'm facing is due to having set margin-right: 15px.
I am looking for an easy way to add new recipes by simply inserting a new div. Removing the margin on the 5th div solves the problem temporarily, but it will become problematic with more recipes added, causing them to wrap onto a new line.
mr-15 = margin-right: 15px
mb-15 = margin-bottom: 15px
Any assistance would be greatly appreciated!