I have a variety of elements on my page that need to be displayed in straight columns, with multiple images aligned horizontally and vertically. Each image has the same size and when clicked, an icon menu with three items appears in its place.
As the number of large images can vary (6, 7, 8 or more), I want to group them within one row-class.
Although I've followed bootstrap documentation, the logic of these elements on the page seems to be flawed.
What am I missing?
<body>
<!-- HTML code snippet -->
</body>
I'm currently encountering issues regarding the layout as shown below:
Screenshot of my current result: https://i.sstatic.net/O4Y5N.png
Desired layout screenshot: https://i.sstatic.net/6gPXE.png
I would appreciate any guidance you could provide. Thank you for your help in advance. While I was able to achieve this without bootstrap, I believe utilizing bootstrap properly with the elements should enable me to maintain an adaptive layout.
Update: @LegendaryAks helped fix the gap issue by using
<div class="clearfix"></div>
after the icons element, but centering all elements for an adaptive layout with an unknown total number of elements remains unresolved.
Update 2: Centering just one element at the end is not sufficient. We need a solution to center from one up to the maximum number of elements on the last row so that we can load all elements onto the page with no concerns about centering the last row.