Product preview card component solution - HTML, SCSS

Solution retrospective
I used microdata to enhance semantics.
What challenges did you encounter, and how did you overcome them?To stretch the image to fit the card height on desktop view, first I applied display: flex
both on the image parent element and on its parent; but, the image did not stretch correctly on Safari. To fix, I forgot about flex and just added height: 100%
to the image itself (and object-fit: cover
to ensure the image remains well-proportioned).
No particular help requested.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on webdevbynight's solution.
Join our Discord community
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