this post was submitted on 07 May 2025
1139 points (96.7% liked)

Programmer Humor

24262 readers
2412 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] obinice@lemmy.world 45 points 1 month ago (32 children)

Okay but how do u center a div in 2025

[–] umbraroze@slrpnk.net 17 points 1 month ago (17 children)

If using plain CSS, usually it's enough to set width appropriately, and margin-left and margin-right to auto.

If using a Modern Frontend/CSS Framework, then may God have mercy on your poor soul.

(Seriously I just started a new project with TailwindCSS and I'm so confused. But not entirely desperate yet.)

[–] loics2@lemm.ee 4 points 1 month ago

w-... mx-auto, replace the 3 dots with your desired width value, and that's it with tailwind

load more comments (16 replies)
load more comments (30 replies)