about centering a form
So i got a problem not a master in css, why I can't center a form without the heigh in 100vh?
Im using flexbox btw
2 Replies
I assume you're asking about centering vertically. If you don't set a height, the browser tries to keep things as small as possible. Centering something in a tight wrapper has zero effect
you also shouldn't use vh https://www.youtube.com/watch?v=ru3U8MHbFFI https://www.youtube.com/watch?v=veEqYQlfNx8
Kevin Powell
YouTube
Use these instead of vh
Looking to step up your CSS game? π https://kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=viewportunits I have a bunch of courses, including several free ones.
I see people use
vh
a lot, and then complain that it doesnβt work the way they thought it would, so in this one, I explore a few other options that we have,...Kevin Powell
YouTube
The problems with viewport units
Conquering Responsive Layouts (free course): https://courses.kevinpowell.co/conquering-responsive-layouts
Join the Discord: https://kevinpowell.co/discord
Viewport units often feel like this cheat code that makes things so much easier when you first discover them, but they actually are problematic for a number of reasons, from creating horizon...