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

Responsive Product Card using CSS Flexbox

David•130
@OMallesDev
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 the thing I'm most proud of is just being able to solve the problem of switching from a 2 column flexbox to a single column and having the layout switch to still look in line with the design.

Unfortunately I completely started this project desktop first as that's what I'm used to. In the future after having several setbacks I fully intend to build mobile first and build out from there as fixing issues in desktop seem to be less problematic.

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

The largest problem I faced was definitely with how I did things. As I'm used to doing desktop first I didn't even stop to think to do it mobile first and this caused a lot of issues when trying to format the layout for the mobile device and required more changes than what was probably necessary. I definitely had to do some digging on different forums along with trial and error to get things to look the way I wanted them to.

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

Things I think I could use help with.

-What kind of position is more helpful in a mobile base ie (relative, absolute, fixed) or if they're even necessary in that regard?

-I'm still a little wonky on figuring out positioning when it comes to mobile as it seems I always have less space on the right side of an element versus the left. And although this can be worked around with margins I feel there might be a better way that I can't find.

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

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