Design comparison
SolutionDesign
Community feedback
- @DigitaleWeltLibraryPosted about 2 months ago
Hey 👋, i like your solution.
Maybe you forgot to center the card vertically. To center the card give the main element a height of 100dvh. Then can you center it. I like to use
grid
but you can useflex
as well. Withdisplay grid
you say that all elements in themain
tag are grid children. For centering (vertically and horecontely) you useplace-items
center.The style which you can add to your main tag:
main{ display: grid; place-items: center; height: 100dvh; }
Happy coding 😉
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