I always see this meme going around, but it's just plain and simply untrue now that Grid can be used reliably.
You can center anything by making the container display:grid; align-content:center; justify-content:center; I don't know of any situations where that wouldn't work. Flex is a bit finnickier to understand with its major/cross axis concept and wrapping, but you can write Grid layouts with your eyes closed.
It gets better as you practice and learn good practices, and for the kinds of "fun" projects OP wants to do, there's no real downside to using a css framework that abstracts a lot of it away.
> centering a div can still be very hard depending on the circumstances.
Only thing i could think is targeting ancient browsers. I'm curious, do other UI languages not have quirks or edge cases to learn?
kroltan|3 years ago
You can center anything by making the container display:grid; align-content:center; justify-content:center; I don't know of any situations where that wouldn't work. Flex is a bit finnickier to understand with its major/cross axis concept and wrapping, but you can write Grid layouts with your eyes closed.
schwartzworld|3 years ago
> centering a div can still be very hard depending on the circumstances.
Only thing i could think is targeting ancient browsers. I'm curious, do other UI languages not have quirks or edge cases to learn?
bob1029|3 years ago
Are the circumstances that you are banned from using flex or grid?