Design comparison
Solution retrospective
I'm not quite sure if using position relative and eyeballing it is the best way to center it, if anyone uses something more reliable please let me know
Community feedback
- @pantherdoxPosted over 1 year ago
if you are a newbie developer, then this project is well enough crafted by you and you deserve appreciation for the effort you put on this project. As i can see you are still not good with position properties, try to practice flexbox and grid. To center this use: body{ display: flex; justify-content: center; align-items: center; min-height: 100vh; }
or
body{ display: grid; place-content: center; min-height: 100vh; }
Marked as helpful1@ServalFakePosted over 1 year ago@pantherdox I appreciate the feedback! Flexbox is something I'm trying to use more and more and it seems to have worked well on my current project. I've never used gridbox, but I'll make sure to incorporate it on my next project.
0 - @SorpandaPosted over 1 year ago
If you use:
min-height: 100vh; display: grid; place-content: center;
on the body then it will center it.
Good job!
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