Not Found
Not Found
Not Found
Not Found
Not Found
Request path contains unescaped characters
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

@20-ank-02

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

zofia-mm 160

@zofia-mm

Posted

It's so pretty! 🤩

Only one thing is off - centering. I know, 'cause I had that problem too. Here's a solution that @DavidMorgade gave me:

body {
  background-color: hsl(30deg, 38%, 92%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
}

Marked as helpful

2

David 8,000

@DavidMorgade

Posted

@Fobya7 Yeah, using flex on the body (you also have to set a min-height: 100vh to make your body wrapp the viewport) will be the easiest way to center the card!

Great feedback Fobya!

Marked as helpful

1

@20-ank-02

Posted

@Fobya7 thanks for the solution, i'll incorporate into my project

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