My goal is to create an image gallery using Bootstrap, with 3 columns on large screens and 2 columns on mobile. I want to maintain the aspect ratio of each image while fixing the width so they align within the columns. I was able to achieve this on large screens, but ran into issues on mobile devices. On mobile, the last column just stacks below the first one. I believe I need to rethink my approach to have the images fill up all available space. While I looked into other posts, they focused on images with similar aspect ratios. I'm considering that Bootstrap might not be the best solution, but I'm unsure of the next steps.
This was my attempt:
<div class="container">
<div class="row">
<div class="break"></div>
<h4 class="headline text-center">illustrations.</h4>
<div class="break"></div>
<div class="col-md-4 fcontainer">
<div class="row iframe">
<img class="item" src="Assets/Illustrations/Test3.jpg" alt="Test6">
</div>
<div class="row iframe">
<img class="item" src="Assets/Illustrations/Test4.jpg" alt="Test5">
</div>
<div class="row iframe">
<img class="item" src="Assets/Illustrations/Test6.jpg" alt="Test4">
</div>
<div class="row iframe">
<img class="item" src="Assets/Illustrations/Test1.jpg" alt="Test3">
</div>
<div class="row iframe">
<img class="item" src="Assets/Illustrations/Test5.jpg" alt="Test2">
</div>
<div class="row iframe">
<img class="item" src="Assets/Illustrations/Test2.jpg" alt="Test1">
</div>
</div>
<--! multiply above div 2 more times for 3 columns -->
</div>
</div>
<div class="break"></div>