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 Flexbox

@mpgithubcode

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 didn't understand if I should throw everything in a div:

  • for example, the two prices (one actual the other strike through) I put then both in a div so i could position them side by side

Community feedback

@alexgcode

Posted

Hello, for this case I don't think there is a down side to put everything in a div, as long it help you to layout faster. And I think the desktop design looks pretty good.

0
Hyron 5,870

@hyrongennike

Posted

HI @mpgithubcode,

Good job on the challenge

The card is slightly off center min-height: 100vh to the body rule to center is. remove the height: 90vh

You can add the following media query to make things looks better on mobile.

container .image img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

.container {
    flex-direction: column;
}

Hope this is helpful.

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