Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 11 months ago

Product Preview Card with CSS and HTML

P
vercthu•120
@vercthu
A solution to the Product preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What challenges did you encounter, and how did you overcome them?

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.

What specific areas of your project would you like help with?

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.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License