Design comparison
SolutionDesign
Community feedback
- @davidsonaguiarPosted 8 months ago
Hey friend, how are you?
I noticed that your card is not centered. You can use the
min-height
property on the body and set the min value to100vh
and use flex box or grid to center it.Center using flex box:
body { min-height: 100vh; display: flex; justify-content: center; align-items: center; }
Center using flex grid:
body { min-height: 100vh; display: grid; place-content: center; }
Links
1@MaxCodeCraftPosted 8 months ago@davidsonaguiar Thank you for this feedback, I should have used flexbox or grid instead of transition: translate(-50%, -50%) on my project too.
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