Design comparison
SolutionDesign
Solution retrospective
I had some trouble figuring out how to center proprely,
body{
min-height: 100vh;
display: grid;
place-content: center;
}
I'm not 100% though, and i have no clue about best pratices, so any hint I would appreciate it.
Community feedback
- @YoungZVPosted over 1 year ago
or you can try this: min-height: 100vh; display: grid; place-items: center;
1 - @Chukwudiasiegbu1Posted over 1 year ago
( On the parent div) Display: flex; align-items: center; justify-content: center;
OR (On the div you want to center)
Margin: auto; top: 0; left:0; right:0; bottom: 0; position: absolute;
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