Hello fellow programmers, I'm currently facing a challenge. I'm trying to create a gallery using HTML, CSS, and Bootstrap (I have a good grasp of JavaScript and still learning).
I'm aiming to make it fully responsive, but I'm struggling with the layout. Whenever I reduce the width of the screen, the images inside the div end up going down. I've tried making both the image and the div responsive, but since the div is a block element, it naturally moves down. I even tried using spans, but no luck. You can see the issue in the uploaded picture.
This gallery contains multiple images in a row. What I'm looking for is that as I decrease the browser width from medium (around 1200px) to small (around 992px), the image sizes should decrease accordingly and shift to a new line. This should be consistent across all screen sizes, ensuring that images remain hidden for laptop users as the browser width decreases.
**I'm particularly frustrated by the fact that the images also shift down when the width decreases, which is quite awkward. I'd like to avoid this issue.**