Design comparison
SolutionDesign
Community feedback
- @HassiaiPosted over 1 year ago
To center the main on the page using flexbox, add align-items: center and min-height:100vh to the body.
To center .main on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
for a responsive content, replace the width in container with max-width and increase the value .
max-width: 352px which is 22rem
.Replace the height in the main with a padding value for all the sides, this will prevent the content from overflowing on smaller screens and its a responsive replacement.
padding:1rem
.Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0
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