3 ms·
Trouble with CSS is still this: https://media.giphy.com/media/yYSSBtDgbbRzq/giphy.gif https://media.giphy.com/media/yYSSBtDgbbRzq/giphy.gif (Peter Griffin tryin
by ri0t 4y ago
Trouble with CSS is still this: https://media.giphy.com/media/yYSSBtDgbbRzq/giphy.gif https://media.giphy.com/media/yYSSBtDgbbRzq/giphy.gif
(Peter Griffin trying CSS)
And centering a div can still be very hard depending on the circumstances.
- bob1029 4y ago> And centering a div can still be very hard depending on the circumstances. Are the circumstances that you are banned from using flex or grid?
- kroltan 4y agoI 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.
- schwartzworld 4y agoIt 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?