464
The Centerer (lemmy.world)
top 27 comments
sorted by: hot top controversial new old
[-] magic_lobster_party@kbin.social 73 points 1 year ago
[-] Zucca@sopuli.xyz 6 points 1 year ago

Hehe.

I see what you did there.

[-] Andrew15_5@mander.xyz 2 points 1 year ago

It's not weird, it's powerful!

[-] SaintWacko@midwest.social 29 points 1 year ago

Hell, I'm a web dev and I'd pay someone to center things for me

[-] ICastFist@programming.dev 8 points 1 year ago
[-] Agentseed@artemis.camp 1 points 1 year ago

I still use <center> tags on some things, it's quick and I'll fix it when it eventually breaks

[-] Rolando@lemmy.world 1 points 1 year ago

Great, now make it blink.

[-] BusterStatus@kbin.social 3 points 1 year ago

For real. When I have a front-end story to do, I basically just slam on the keyboard until it looks close to how UX wants it.

[-] gornius@lemmy.world 1 points 1 year ago
[-] Bye@lemmy.world 25 points 1 year ago

I don’t do web dev, I write math software that makes very rich people richer. But I often hear of this centering and layout crap

Why doesn’t html just have hcenter and vcenter tags or something? Why is centering so hard?

[-] xigoi@lemmy.sdf.org 20 points 1 year ago

HTML has moved on from non-semantic tags a long time ago, and centering is easy with modern CSS.

[-] Kolanaki@yiffit.net 5 points 1 year ago* (last edited 1 year ago)

Since when does HTML not have a simple centering tag?

Edit: Since HTML5 apparently. Wow wtf?! I haven't actually used HTML since I was in high school. That's wild.

[-] lorty@lemmygrad.ml 2 points 1 year ago

As a frontend dev: who knows?

[-] Blackmist@feddit.uk 18 points 1 year ago

Centering things on a web page is so easy.

I also have to look it up every single time.

[-] BlackEco@lemmy.blackeco.com 10 points 1 year ago

I wasn't expecting this to work, and yet it does: https://css-tricks.com/the-peculiar-magic-of-flexbox-and-auto-margins/

When Sam says, “that item will automatically extend its specified margin to occupy the extra space in the flex container,” the way my empty filing cabinet brain interprets that is like so:

Setting the margin property on a flex child will push the child away from that direction. Set margin-left to auto, the child will push right. Set margin-top to auto and the child will push to the bottom.

[...]

Why is this useful to know? Well, I think there are a few moments where justify-self or align-self might not get you exactly what you want in a layout where using auto margins gives you that extra flexibility to fine-tune things.

[-] sunbytes@lemmy.world 9 points 1 year ago

"We have justify-content and align-items at home"

[-] jungekatz@lib.lgbt 4 points 1 year ago

I wish i was that good with html/css

[-] 30isthenew29@lemm.ee 3 points 1 year ago
[-] Strawberry@lemmy.blahaj.zone 3 points 1 year ago

cool flex bro

load more comments
view more: next ›
this post was submitted on 07 Aug 2023
464 points (91.7% liked)

Programmer Humor

32060 readers
1250 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS