Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive Product Preview Car using Flexbox

P
mrcordova 1,120

@mrcordova

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I started with a mobile first approach, I would not change a thing.

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

I was having trouble getting the image to take half of the space in the card. I figured out I need to put flex: 1 on the picture element instead of the img element because the picture was a flex item.

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

I welcome any general feedback but one question I had was how to use clamp more effectively. How would I decided what should be the min, best and max and if there some ratio to keep to other text on the screen.

Community feedback

P

@fish-ladder

Posted

I really liked seeing how you changed the cursor to a pointer - that is a detail I had not noticed before!

Since your desktop layout doesn't change size anyway, you could probably just use an exact width on your img of half the card size.

The border radius on your image in the mobile design could probably be tweaked to match the design files a bit more closely.

Overall, I really like your solution and looking at your code has given me some ideas to use in the future. Thanks!

Marked as helpful

1

P
mrcordova 1,120

@mrcordova

Posted

Thanks for the tips and yeah I always have trouble gauging the roundness of borders @fish-ladder

1

Please log in to post a comment

Log in with GitHub
Discord logo

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