Design comparison
SolutionDesign
Community feedback
- @HassiaiPosted almost 2 years ago
To center .card on the page using grid, add place-items: center; to the body. there is no need for justify-content: center; and align-items: center; these are only use when centering with flexbox.
to center . card on the page using grid: body{ display: grid; place-items: center; min-height: 100vh; } To center .card on the page using flexbox: body{ min-height:100vh; display: flex; align-items: center; justify-content: center; }
Use relative units like rem and em as the unit for the widths, paddings, margin and font-size values. For more on CSS unit click here
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