Design comparison
SolutionDesign
Community feedback
- @matiasluduena23Posted 12 months ago
Hi Ankita Kumari! Good work I have one tip that might help you center element in the viewport. To center in the middle of the viewport you need to set a height, if not the page only have the height of you content(the card in this case). So you can add a
mi-height: 100vh
that said to the body that need to take all the height that you screen device has.In you code:
body { background-color: hsl(226, 95%, 89%); font-size: 15px; display: flex; flex-direction: column; //remove this line align-items: center; justify-content: center; margin: 4rem; //remove this line min-height: 100vh; //add this line }
Hope this help you!
Good code!
Matias
1@ankita0399Posted 12 months ago@matiasluduena23,
Big thanks for the heads up!
I'm rolling with those changes, and your tips are like a coding guardian angel. Appreciate it!
Ankita
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