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

Oder Summary Card Challange

@ViktoriaBors

Desktop design screenshot for the Order summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi Everyone!

I am total newbie, trying myself out in the html-css world. Any advice how to place the card holder in the middle of a webpage? Margin, padding, flexob, grid? I am confused :D

Thanks in advance.

Community feedback

darryncodes 6,410

@darryncodes

Posted

Hey Viktoria,

Welcome to FEM, good to have you here - it's the best place to learn (imo)!

To answer your question i'd add Flexbox to your <body> like this: display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh;.

If you've set a max-width on the card you could use margin: 0 auto; to centre horizontally but flex is best in this case!

Here are some really useful resources that might help:

Keep coding!

Marked as helpful

0

@ViktoriaBors

Posted

Hi @darryncodes,

Thanks for your advice. I updated the solution according to the flexbox concept and the report :)

1
darryncodes 6,410

@darryncodes

Posted

Awesome @ViktoriaBors, you can refresh the report to get rid of the issues now!

Unfortunately the link to your Github repo isn't working to double check everything or help further, however:

  • you card could do with max-width: 400px; on .wrapper to dynamically control the width. MDN - max-width
  • border-radius is usually set as px/rem so the corners stay the same shape regardless of the viewport size. 10px looks great on your design
  • this box-shadow generator might help create subtler effect

Any questions let me know!

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