.d1 {
background: lightblue;
display: flex;
padding: 5px;
}
img {
flex: 1;
}
<div class="d1">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/3c/Cityoflondon2019june.jpg">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/3c/Cityoflondon2019june.jpg">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/3c/Cityoflondon2019june.jpg">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/3c/Cityoflondon2019june.jpg">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/3c/Cityoflondon2019june.jpg">
</div>
I want to display for example 5 big-sized images in a row inside the flexbox. I want all the images width to fit the current screen and not wrap at the bottom. I tried different combinations of flex: 1
, width: 100%
of the img
tag but none of it worked...