Design comparison
Community feedback
- @Vanfrankie7Posted about 1 month ago
Yo bro, i had the same issue of my container sticking at the top of the view port. i just put min-height: 100%; on the <body> tag which is the direct element of my flex container. And it worked perfectly.
Take a look at my code;
body { font-family: "Inter", sans-serif; font-size: 14px; color: hsl(0, 0%, 100%); background-color: hsl(0, 0%, 8%); display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.container { display: flex; flex-direction: column; justify-content: center; gap: 15px; padding: 25px; margin: 0 20px; border-radius: 9px; background-color: hsl(0, 0%, 12%); max-width: 375px; }
Try it out and see.
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