Product Preview Card with CSS and HTML

Solution retrospective
I wasn't sure how to change the image file for different screen sizes, but then I saw this article on web.dev. I was also having a hard time aligning the image's bottom with the card bottom on desktop version, but then I realized I just had to adjust the .card height to 450px.
If there are other alternatives for aligning the bottom of an image with the bottom of the card, please let me know. I don't know why the card's height was always bigger than 450px in the desktop version since the content wasn't as high as 450px. I thought the image height would set the card height to 450px automatically, but it turned higher than I anticipated.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on vercthu'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