3 ms·
I still can't believe you have to hack a margin: 0 auto; to center stuff still... Unless there's a new html element or css trick I'm unaware of? (like th
by ghrifter 11y ago
I still can't believe you have to hack a
margin: 0 auto;
to center stuff still...
Unless there's a new html element or css trick I'm unaware of? (like the `<center>` of old)?
- IshKebab 11y agoYeah they actually finally fixed this with flexbox.
- floatboth 11y agoIt's not really a hack – it does make sense. Make left and right margin automatic so it would be balanced automatically. There's flexbox, which allows vertical centering and other cool stuff.
- RobertKerans 11y ago`justify-content: center` when items are laid out on the x-axis, `align-items: center` when on y-axis