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

product review card

Justin•100
@aduatgit
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 think I did a good job starting from the mobile design and adjusting the desktop design afterwards. I did this layout with flex, but I think grid would have made things a bit easier when swapping from mobile to desktop.

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

I had a huge space at the bottom of the product information when on desktop, I bandaid fixed that by adjusting the flex-gap, but again, using grid would probably have solved this more elegantly. In general the spacing was quite weird to get right, in the end I didn't really bother to make things pixel perfect, especially because I wasn't working with a figma file.

I had some issue with the button shopping cart picture, but I managed to solve that using a pseudoelement. The problem that persisted was that it wasn't really centered, but I found out that you could use the image as a background instead of putting it in the content of the pseudoelement, that way it became centered.

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

Is it possible to use flex to fill up the right area (-> the product information) dynamically, without having to use gap and fixed heights and eyeballing it to get it right? I know it is possible with grid, but would really like to know if it is possible with flex.

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