Handling images with inconsistent height in CSS

1 · Amit Merchant · Nov. 30, 2022, 7:37 a.m.
.container-1 { display: flex; justify-content: space-between; align-items: center; padding: 22px; border-radius: 10px; background-color: #d4d4d4; } .container-1 img { width: 20%; } .container-2 { display: flex; justify-content: space-between; align-items: center; padding: 22px; border-radius: 10px; background-color: #d4d4d4; } .container-2 img { width: 25%; aspect-ratio: 3/2; object-fit: contain; } When you’re working with CSS,...