I'm trying to justify 3 images with equal space around them. I set width of images in percents. I tried to use flexbox and justify-content: space-evenly
but images don't keep aspect ratio:
.container {
width: 50%;
border: 1px solid black;
display: flex;
justify-content: space-evenly;
}
.container img {
width: 10%;
}
<div class="container">
<img src="https://cdn2.iconfinder.com/data/icons/humano2/128x128/status/gtk-missing-image.png" />
<img src="https://cdn2.iconfinder.com/data/icons/humano2/128x128/status/gtk-missing-image.png" />
<img src="https://cdn2.iconfinder.com/data/icons/humano2/128x128/status/gtk-missing-image.png" />
</div>
I need to keep aspect ratio