Design comparison
SolutionDesign
Solution retrospective
in this challenge I focused on css-card.
Community feedback
- @hitmorecodePosted over 1 year ago
If you set
min-height
and add flexbox to the body, you don't need to use margin to place the card in the middle of the page.body{ background-color: hsl(212, 45%, 89%); /* add these lines to place the card in the middle of the page. */ min-height: 100vh; display: flex; justify-content: center; align-items: center; flex-direction: column; } .card{ width: 320px; height: 500px; background-color: white; border-radius: 20px; margin-bottom: 20px; /* margin: 100px auto; */ /* you don't need this line. flexbox will take care of this */ }
0
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