attempting to produce a grid pattern that can be reproduced as high as required resembling image listed below.
My 4 * 5 pictures just fill out 4 rows and also leave last one vacant, why?
grid-image {
size: 24em;
elevation: car;
object-fit: consist of;
}
. grid {
display screen: grid;
grid-template-columns: repeat( 2, minmax( 120px, 1fr));.
space: 10px;/ * Change the space as required */.
}
. grid img: nth-child( 1n),
. grid img: nth-child( 4n) {
grid-row: period 5;.
}
. grid img: nth-child( 2n),
. grid img: nth-child( 3n) {
grid-row: period 4;.
}
<< div course=" grid">
> {% for photo in pictures %}
<< img src="/ assets/Images/tattoo/ {{photo}}" alt=" {{photo}}" course=" grid-image">
> {% endfor %}
<.