Design comparison
Solution retrospective
I didn't center the component horizontally, 'cause I didn't want to complicate my first challenge by using flex or grid. Is there anyway I can center it without these two annoying layout?
Community feedback
- @idaomoumiPosted almost 2 years ago
Hi there! Have you tried this for centering your card horizontally and vertically? margin: 0 auto; margin-top: 20vh; or min-height: 100vh; so that it occupies 100% of the viewport height?
Then you don't need to use flex or grid.
Marked as helpful0@ughvopPosted over 1 year agosorry for answering this late lol,
margin-top 20vh; did help for desktop screen size which is wonderful but not in use for mobile screen, it leaves a huge space on top. thanks a lot! @idaomoumi
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