this post was submitted on 22 Dec 2025
252 points (96.3% liked)

Programmer Humor

27983 readers
898 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
 
all 44 comments
sorted by: hot top controversial new old
[–] tiredofsametab@fedia.io 64 points 1 day ago

<CENTER><DIV>just as the founders intended</DIV></CENTER>

/ If your language has 58 ways to accomplish something like that, you're in for a bad time.

[–] hperrin@lemmy.ca 34 points 1 day ago (1 children)

Centering a div is pretty fucking easy nowadays. What’s way harder is aligning a god damned SVG icon with text.

[–] YoSoySnekBoi@kbin.earth 12 points 1 day ago (2 children)

Even that is pretty easy nowadays with modern CSS:

<div> <svg /> Text </div>
div {
    display: flex;
    align-items: center;

    /* If the SVG needs an offset */
    & svg {
        --offset: ...px, ...px;
        transform: translate(var(--offset));
    }
}
[–] onlinepersona@programming.dev 13 points 1 day ago (1 children)

Yeah. Easy. So easy. Text size changes, svg not centered anymore. Add margin (or whatever that inside margin is called), and tada, not centered.

[–] funkless_eck@sh.itjust.works 14 points 1 day ago (2 children)

padding

At the risk of getting flamed - I wonder if because CSS is a design tool not a programming tool, it will seem unintuitive to people from a technical background, but more intuitive to people from a design/arts background

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

Exactly this ^

When we had "backend" people at my shop, they were god awful at css. It was so bad at one point that I scolded any backend person who touched css because they always fucked shit up if they did.

[–] Phunter@lemmy.zip 12 points 1 day ago (1 children)

I fuck up CSS on purpose whenever possible to reduce the likelihood of anyone letting me near it.

[–] TrickDacy@lemmy.world 7 points 1 day ago

Maybe you used to work with me? haha

I think you're right. CSS was more understandable to me after reading that it came from the world of print media. It's how things were laid out there and it was transformed into a language from those with domain knowledge.

But I would be curious if those who studied art also use the same terminology. If so, then it would make sense that it would seem more intuitive to them.

[–] 4am@lemmy.zip 3 points 1 day ago (1 children)

Still using div in 2025

No

[–] YoSoySnekBoi@kbin.earth 6 points 1 day ago (1 children)

I'm confused - it's the only non-semantic standard html container. Ofc it's bad if you're trying to communicate intent, but if it's just for minor layout tweaks, anything else would mess with the document structure. Find me one sufficiently complex website that doesn't use divs lol

[–] irelephant@programming.dev 1 points 1 hour ago

I actually nest everything in <p>s

[–] TrickDacy@lemmy.world 23 points 1 day ago (3 children)

Do people who talk this kind of shit about css really not understand they're just admitting they're not good at css?

[–] Whelks_chance@lemmy.world 17 points 1 day ago (1 children)

If it were designed properly you wouldn't need to be good at it, it would be trivial and obvious to do the only thing anyone ever needs to do to their content within an area of the page

[–] TrickDacy@lemmy.world 29 points 1 day ago* (last edited 1 day ago) (2 children)

Good news: centering a div is insanely easy to do and has been for like 15 years.

[–] Windex007@lemmy.world 17 points 1 day ago (1 children)

You probably didn't expect that comment to make me feel so old.

[–] TrickDacy@lemmy.world 2 points 1 day ago

Haha, sorry bout that. If it makes you feel any better, I felt pretty old about writing it too!

[–] GenderNeutralBro@lemmy.sdf.org 4 points 1 day ago (1 children)

The last time I did any html/css work was about 15 years ago. Now I'm curious what's changed.

[–] myotheraccount@lemmy.world 6 points 1 day ago

flex box, grid layout, and a million other things

[–] cbazero@programming.dev 15 points 1 day ago (2 children)

If you need to be good at a layout language to center something, then maybe the layout language sucks.

[–] TrickDacy@lemmy.world 9 points 1 day ago

What it says is zero knowledge on the part of the whiner.

[–] irelephant@programming.dev 2 points 1 hour ago

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

[–] Quibblekrust@thelemmy.club 2 points 2 hours ago (1 children)

I'm not good at programming Brainfuck, either.

[–] TrickDacy@lemmy.world 1 points 1 hour ago

You probably haven't put any effort into learning either language. I find that people who whine about css to normally be backend programmers who are really terrible at design and want a scapegoat to blame.

[–] squirrel@piefed.kobel.fyi 20 points 1 day ago
div {
  display: grid;
  place-items: center;
}
[–] korthrun@lemmy.sdf.org 14 points 1 day ago

Lol, easier to write an article theorizing the ways it can be done than to just show him a centered div.

[–] eskuero@lemmy.fromshado.ws 12 points 1 day ago

<center></center>

I only know how to stick it in a cell in a table and center the cell.

Never learned css, a bit left behind now hehe.

[–] Ensign_Crab@lemmy.world 8 points 11 hours ago* (last edited 11 hours ago) (1 children)

It's nonintuitive and could have been designed better from the outset, but it's not impossible or even difficult. Now can we fight about something meaningful?

vim and emacs are right there, people.

[–] Jankatarch@lemmy.world 2 points 50 minutes ago

Emacs has a better file-manager and you can setup an extremely great latex-editor.

Also extensions don't randomly not work on bsd as much. There is even evil-mode and no-window option.

The only place vim wins at is that there is an optional and lightweight autcomplete with lsp support you can activate by pressing or during interactive mode.

And NOBODY uses it.

[–] velindora@lemmy.cafe 1 points 1 day ago (1 children)
[–] tiredofsametab@fedia.io 1 points 17 hours ago

I assumed it was a personal name, but I don't know.

[–] onlinepersona@programming.dev -2 points 1 day ago (1 children)

CSS is trash. Always has been, always will be.

[–] TrickDacy@lemmy.world 29 points 1 day ago (1 children)
[–] onlinepersona@programming.dev -5 points 1 day ago (1 children)

Yeah, using trash is definitely a skill issue. You're right about that.

[–] TrickDacy@lemmy.world 4 points 1 day ago (1 children)

So you're saying it's a skill issue that you try something you're bad at? Seems unnecessarily hard on yourself.