I am facing an issue with displaying 3 images in a row side by side. The first image is bigger than the other two, causing them to be pushed down to the next row, which is not what I want. I have created a class and specified the height and width, but it doesn't seem to be working.
.workImgs {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
width: 100vw;
max-width: 100rem;
}
.workImg {
object-fit: cover;
height: 20rem;
margin: 0.5rem;
}
<div class="workImgs">
<a href="#" target="_blank"><img src="https://picsum.photos/245/182" alt="" class="workImg" /></a>
<a href="#" target="_blank"><img src="https://picsum.photos/185/184" alt="" class="workImg" /></a>
<a href="#" target="_blank"><img src="https://picsum.photos/184/165" alt="" class="workImg" /></a>
</div>
This result shows that the first image's width needs to be adjusted to match the size of the other two so they can all fit on the same row. I tried using different IDs for the larger image, but that did not solve the issue.