O
14

Been seeing people mix up flexbox and grid positioning lately...

I was helping a guy on the learnprogramming Discord last night who spent 3 hours trying to center a div with flexbox properties in a grid container... it was a mess. He kept asking why align-items wasn't working and I finally noticed he had display: grid not display: flex on the parent element. It's such a small thing but I see this mistake at least once a week in beginner boards now. Has anyone else noticed how often people treat grid items like flex children without checking which layout mode they're actually in?
2 comments

Log in to join the discussion

Log In
2 Comments
coran63
coran636d ago
Lol classic. People treat CSS like it's a guessing game instead of just checking what display property is even set.
4
margaret234
margaret2346d agoMost Upvoted
@coran63 the issue is more than just display though, you still gotta check for overrides and specificity chains that can mess it up.
6