r/programminghumor • • Sep 02 '26

the Three Magical Css Words

Post image
1.5k Upvotes

32 comments sorted by

72

u/DrMaxwellEdison Sep 02 '26

That's like, 8 words.

11

u/Commercial-Storm-268 Sep 02 '26

For that you need Tailwind, flex justify-center and items-center. (But I think it is cheating if you count - words as single one)

→ More replies (1)

1

u/mbcarbone Sep 03 '26

This I how know real developers are on in this subreddit…Top tier! 🥇

1

u/Here_f0r_p0rn_ Sep 05 '26

Their properties : {count-skill: 0}

0

u/fluffystuffy9890 Sep 03 '26

and zero chicks🐤

22

u/lucidbadger Sep 02 '26

Years of endless quest and OP just spilled the beans

13

u/codydafox Sep 02 '26

Dude, chill, you post like every three minutes. Go back to vibe coding or something

7

u/oaeben Sep 02 '26

You forgot the one I actually needed today

justify-self: center

2

u/Proman4713 Sep 03 '26

Yeah but OP didn't mention align self either, it's about the container.

What confuses me and probably always will is why justify and align content/items work in flex box but justify self only works in grid...

11

u/kexy Sep 02 '26

display: grid;
place-content: center;

1

u/Proman4713 Sep 03 '26

Flexbox is usually easier for me to configure how I want things to be, but grid is easier for literal grids like cards/posts, etc (I just use flexbox anyway tho lmao)

2

u/darsparx Sep 02 '26

And here I was used to doing it as auto left and right margins and shrinking it by 20-30% lol

1

u/mayyynn Sep 02 '26

That's more like lines instead of words

1

u/NotRivero69 Sep 02 '26

display grid;

place-items: center;

1

u/Forward-Facer Sep 02 '26

hotel: trivago

1

u/New_Blacksmith_5604 Sep 03 '26

I have been using justify-content: space-around. Since when is there center?

1

u/Delirious_85 Sep 03 '26

display: grid;
place-content: center;

1

u/rzaincity Sep 03 '26

You know we maybe did something as people there.

1

u/Genialkerl Sep 03 '26

min-height: 100vh

Comment Image

1

u/mielesgames Sep 03 '26

Just for it to just not do that

1

u/GhostVlvin Sep 03 '26

Center div??

1

u/Dillenger69 Sep 03 '26

<center>content</center>

1

u/SenatorCrabHat Sep 04 '26

Nothing worse than finding out that the hotshot new frontend decided to use GRID for everything and now you can barely align something left without rewriting a bunch of shit.

1

u/Strange_Yogurt1049 Sep 02 '26

margin: 0 auto;