Adrian• 190
@ohsite
Posted
Hi, thank you for your help!
0
Looking to hire developers?
Hello community! The top image is in the of class "card__image", In desktop version it has the size of an svg image. When i try to cale it's height down for the mobile version weird things happen. Any help would be appreciated!
@ohsite
Posted
Hi, thank you for your help!
@anar-sol
Posted
Hello!
What problem do you have with the card__image
?
If you want the image to be exactly the size of its container, add this:
.card__image > img {
width: 100%;
height: 100%;
object-fit: cover;
}
MDN object-fit
page: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord