Design comparison
Solution retrospective
Would you have tips to make the code more DRY?
Thank you!
Community feedback
- @AdamBtechPosted 10 months ago
Hi guys, thank you for your feedback, i have updated the body and removed the margin on the container!
1 - @danielmrz-devPosted 10 months ago
Hello @AdamBtech!
Your project looks great!
I have one suggestion:
š Don't ever use
margin
with percentage values to move an element from the borders. Here's a very efficient (and better) way to center the card:- Apply this to the body (in order to work properly, don't use position or margins):
body { min-height: 100vh; display: flex; justify-content: center; align-items: center; }
I hope it helps!
Other than that, great job!
1 - @tharidu678Posted 10 months ago
you can set your body tag style like this..
.body{ display:flex; align-items:center; justify-content:center; height:100vh; }
this may help you to get rid off your scrollbar.
You only need one div in your body tag for this to work.. if you have one or two div s in body tag, put them in a div.
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