Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Product preview card

Hamna•40
@Hamna-Altaf
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 are you most proud of, and what would you do differently next time?

I am pleased that the final look closely matches the sample design. I know my code isn't perfect and has room for improvement. Next time, I want to write more efficient, effective, and clean code.

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

Initially, I struggled to fit the image properly on the card, and when I adjusted the card's border-radius, the image's border remained unchanged. After researching the issue, I discovered the object-fit property and set it to cover, which resolved the problem. I also couldn't find the cart logo in the downloaded files as the image was missing so I downloaded one from Google, though it doesn't exactly match the design.

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

I want to know how to write cleaner and more efficient code. I know that the HTML structure could be improved, and I believe there are ways to make my CSS styling cleaner and more effective. I want to make the code more readable and easier to understand.

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 Hamna'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