Design comparison
SolutionDesign
Solution retrospective
My flex box is not working properly . I did display:flex; justify-content:center ; align-items:center; but it didn't work , align-items:center is not working . So i used padding in body tag.
Community feedback
- @Kyr27Posted almost 2 years ago
Add
min-height: 100vh
to your body where flex is in order to center it:body{ background-color: hsl(212, 45%, 89%); display:flex; align-items:center; justify-content:center; min-height: 100vh; /*padding:100px;*/
Marked as helpful1@SatyaaamPosted almost 2 years ago@Kyr27 Bro why it was not working earlier ? Thanks it worked now by your method.
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