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 order summary component

France 100

@LanXhan

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


Day 1[reboot] Hello any advice on what to improve? Also I have difficulties in centering div tags

Thank you!

Community feedback

SpyrosAliv 100

@SpyrosAliv

Posted

Great solution!

As for centering an element inside another element, flexbox is the way to go. By setting the display of the parent element to "flex", you can set the following attributes to the child "self-align: center; justify-self: center;". This will center the element both vertically and horizontally inside the parent element.

Marked as helpful

1
amrajat 170

@amrajat

Posted

Congratulations on completing the challenge. There are a couple of hacks for centering a div horizontally and vertically. One easy hack is flex -> set display: flex, align-items: center, justify-content: center to the parent element. Hope this helps :)

Marked as helpful

0
Lahcen 150

@Lahcenalll

Posted

Hello,

I applaud you for your efforts and for taking this challenge. I've noticed that you've had trouble centering the card. I've suffered from that too, lol, so here's how to easily center it using flex box.

  1. make sure the body has a width & height of 100percent, and use the following :

display: flex; align-items: center; justify-content: center;

Happy coding.

Marked as 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