How to make image start from top of the div and add border radius?

https://codepen.io/avinash-tallapaneni/pen/dygGrjR parent div of image is positioned display:absolute to its parent. so setting display:relative to the parent wont work. How should i proceed? Also since im using object-fit:contain how should i add border-radius to the image?
5 Replies
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
Avinash
Avinash13mo ago
each image is of different size, so im trying to make it fit to the top of the respective parentdiv
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
Avinash
Avinash13mo ago
if i do object-fit:cover the visible part of the image is very little and the user cant see the image.
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View