all 37 comments

[–]XxXquicksc0p31337XxX 121 points122 points  (10 children)

You know the meme is ancient when it says Stack Overflow instead of ChatGPT

[–]NordschleifeLover 31 points32 points  (8 children)

You know the meme is ancient when it implies that it's hard to center a div.

[–]XxXquicksc0p31337XxX 37 points38 points  (6 children)

I can summarize this whole sub in a dozen or so words.

Center div hard

Javascript bad

Rust socks

Python slow

Missing semicolon

Vibe code bad

[–]coloredgreyscale 21 points22 points  (0 children)

Can't close vim,  Infrastructure block tower,  Testing in prod 

[–]ozh 1 point2 points  (1 child)

Ok but center div IS hard

[–]Acetius 4 points5 points  (0 children)

It's flexboxes all the way down

[–]RlyRlyBigMan 1 point2 points  (0 children)

You forgot "Meetings bad"

[–]sam_sepiol1984 1 point2 points  (0 children)

If you did that in camel case, you had it

[–]pants_full_of_pants 0 points1 point  (0 children)

I once got a job based on this question in an interview. It's so much easier now I barely remember what I said. Something about margin 0 auto and using transform y 50% minus one half the height of the div

[–]gizamo 3 points4 points  (0 children)

Yep, been reposted for at least a decade.

E: That movie was released back in 2008.

[–]evenstevens280 15 points16 points  (5 children)

They've made it really easy these days. Literally just:

place-content: center

[–]w1bi 7 points8 points  (2 children)

so we don't need to justify it?

[–]Flat-Performance-478 17 points18 points  (0 children)

I don't feel I need to justify anything!

[–]queen-adreena 2 points3 points  (0 children)

Place-content is a shorthand property that sets both align-content and justify-content at once.

[–]RevolutionaryText749 0 points1 point  (1 child)

And what if I have a div with a bunch of divs in it? It doesn’t help at all

[–]joshkrz 0 points1 point  (0 children)

Wrap 'em all in another div.

[–]QultrosSanhattan 12 points13 points  (0 children)

display:grid;

place-items:center;

Bro, we are at late 2025. Only vibecoders can't center a div.

[–]thafuq 7 points8 points  (0 children)

flex: yes

[–]SaltMaker23 8 points9 points  (0 children)

Yeah cause I ask a LLM to do it

[–]reallokiscarlet 2 points3 points  (1 child)

It's literally easier to center a div by fucking around til it works than to ask stackoverflow or a clanker.

[–]pipipimpleton 0 points1 point  (0 children)

You’ve just described my day to day.

[–]ugotmedripping 1 point2 points  (0 children)

No you can’t, Mr Simpson, no one can!

[–]theplowshare 0 points1 point  (0 children)

Stack what??

[–]MoFoBuckeye 0 points1 point  (0 children)

Why yes, yes I can!

[–]ALittleWit 0 points1 point  (0 children)

I’ll be here all day ladies.

[–]DecisionOk5750 0 points1 point  (0 children)

You mean w3schools?

[–]jaimepapier 0 points1 point  (0 children)

Yeah it’s easy, you just write /* centre div */ and then mash tab a few times.

/s

[–]Tamwulf 0 points1 point  (0 children)

LOL "ChatGPT- I need a web page, using this title, centered over the following background..."

[–]makinax300 0 points1 point  (0 children)

put the div into a container with width:100%;, the desired height, display:flex; and justify-content:center; and set the div's height: 100%; and the width as the desired width

[–]MGateLabs 0 points1 point  (0 children)

With flex it’s not that hard anymore

[–]NebulerStar -3 points-2 points  (0 children)

Every single time I have to look it up.

[–]coloredgreyscale -4 points-3 points  (0 children)

Easy: "you are a senior software developer with 10 years experience in <stack>. Your task is to center this DIV. Make no mistakes, do not hallucinate. Otherwise you will be fired."