this post was submitted on 22 Dec 2025
280 points (96.1% liked)

Programmer Humor

28016 readers
1693 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
[–] irelephant@programming.dev 4 points 1 day ago (2 children)

You literally just have to give it a width and add margin: 0 auto;

[–] humorlessrepost@lemmy.world 1 points 7 hours ago* (last edited 7 hours ago)

I think it’s implied they’re talking about centering both horizontally and vertically. And probably with unknown height.

Still easy these days , though.

[–] Witchfire@lemmy.world 1 points 1 day ago* (last edited 1 day ago)

Or use Flexbox

But your solution works as well for simple cases