Design comparison
Solution retrospective
This is my solution for the order summary component project. All feedback will be appreciated. Thank you.
~George
Community feedback
- @HassiaiPosted over 1 year ago
Give the body a background-color of pale-blue. there is no need to give the body a background-position rather change the background-size to contain.
background-size: contain
For a responsive content, give the main a fixed max-width value instead of a percentage width value .
max-width: 432px which is 27rem/em
To center the main on the page using flexbox or grid instead of margin, add min-height:100vh; display: flex; align-items: center: justify-content: center; to the body OR add min-height:100vh; display: grid place-items: center to the body
- USING FLEXBOX:
body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
- USING GRID:
body{ min-height: 100vh; display: grid; place-items: center; }
In the media query you only have to change the background-image of the body.
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here and here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
1
Please log in to post a comment
Log in with GitHubJoin 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