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

Product-preview-card-component using Flexbox

@alawi17

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


I still not comfortable with the result, I would appreciate any feedback :)

Community feedback

@amalkarim

Posted

Hi Sayyid 👋

Congratulations for completing the challenge!

Why do you feel uncomfortable about the result? It's a great solution! However, let me point out some of the things that could be improved. But this is only my personal view, it's not necessarily the best solution out there.

  • Never give height: 100vh; to the body. When the browser height is less than the content, it will make some parts of the page hidden and we can't scroll to see them. Change it to min-height: 100vh;
  • Add object-fit: cover; to .card__image img to make sure the image isn't squeezed at any given width.
  • Change @media screen and (min-width: 375px) and (max-width: 462px) to @media screen and (max-width: 462px) in order to avoid the page design back to desktop mode when the screen width is less than 375px (though I'm not sure people nowadays using screen less than 375px)

That's all. Hope this helps. Happy coding!

Marked as helpful

1

@alawi17

Posted

@amalkarim Thanks for the feedback! I really appreciate it.

0
S MD suleman 3,530

@sulemaan7070

Posted

hey, sayyid, for the desktop version your site is good, but it is not mobile-responsive. you can probably use the "flex-wrap" property on certain @media point since, you have already used flex-box

0

@alawi17

Posted

@sulemaan7070 Thanks for the feedback.

0

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