I have to display 10 images that goes by row. For example:
1 2 3 4
5 6 7 8
9 10
(The number is the images)
With these images, I want to remove any white space between 2 images.
Currently, I am using column-count of CSS, but the images still have the gap between the rows.
How can this gap be removed ?
(P.s.: The issue is that all the images have different heights, so what happens is that the area taken by an image is dependent upon the maximum image height for that row)
I want to resolve it only using CSS without any JS.
HTML Code:
<div class="container photos-container">
<img class="col-lg-3" src="1">
<img class="col-lg-3" src="2">
<img class="col-lg-3" src="3">
<img class="col-lg-3" src="4">
<img class="col-lg-3" src="5">
<img class="col-lg-3" src="6">
<img class="col-lg-3" src="7">
<img class="col-lg-3" src="8">
<img class="col-lg-3" src="9">
<img class="col-lg-3" src="10">
</div>