It has that undesirable spacing. Here is an example of what I'm trying to achieve: https://codepen.io/LilyAnne56/details/jOvqgZp They used three div tags in the html. I have PHP code that has images uploaded from a database, so I'm not sure how I would code this in the php.
Here is CSS:
container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
text-align: center;
margin: 20px 20px 0 1px;
}
.container .box .dream{
display: row;
width: auto;
}
.container .box .dream img {
width: 300px;
height: auto;
margin-right: 15px;
margin-bottom: 15px;
border-radius: 5px;
vertical-align: top;
}
When I tried using grid, it made the images distorted. I tried a few other tutorials from Youtube that made a nice dynamic gallery, but the images lost their original dimensions. Since this is eventually for a photography shop, I really want to keep the original image sizing or close enough. I found ways to make it look similar to this gallery using nth child() selector, but each row was set to a size, and since some of the images are taller and some more wide it wasn't ideal.
Is it something I should add/change to the php?