0
Warning: I wasted 2 hours on a CSS Flexbox bug today
Turns out I forgot to set the container height. I tried everything but a simple "min-height: 100vh" on the parent div fixed my whole layout. Has anyone else spent way too long on one missing property?
2 comments
Log in to join the discussion
Log In2 Comments
henry6041mo ago
Honestly, how is it that one single property can just wreck your whole afternoon like that? Tbh I’ve done the same thing with min-height 100vh on a hero section, spent like an hour checking margins and padding before I realized the parent had zero height. Ngl it’s wild how easy it is to overlook that when you’re busy tweaking everything else. The worst part is when you finally find the fix and feel like an absolute clown for missing it.
9
the_patricia1mo ago
Drove me insane a few times too. Over the years I've actually come to understand why min-height 100vh is so clutch for flexbox layouts. Used to think a simple height: 100% would do the trick but nope, the viewport height is the real hero. You're not alone, that missing piece is easy to overlook.
4