@Vanfrankie7
Posted
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.