this post was submitted on 07 May 2025
1129 points (96.8% liked)

Programmer Humor

23132 readers
734 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
[–] [email protected] 38 points 2 days ago (2 children)

I feel attacked by "how to center div 2025"

[–] [email protected] 12 points 1 day ago

Super easy!

<center>
<div>
</div>
</center>
[–] [email protected] 8 points 1 day ago (1 children)
.parent {
    display: grid;
    place-items: center;
}

couldn't be easier in 2025.

[–] [email protected] 2 points 1 day ago (1 children)

probably a lot less performant than doing it the old fashioned way. sometimes that matters. you should have the non-grid non-flex method half committed to memory. abusing flex or grid to save 2 lines of code is not a great practice, and having only one child element is usually a pretty clear sign that flex/grid is the wrong tool for the job

at the end of the day though do whatever you want, in fact why not just write a javascript function to recenter it every frame at 60fps cause 99.9% of the software 99.9% of people interact with is pure shit made by developers who don't care for users who don't care.

we live in a slop world, made by and for slop people who love slop. can you tell i've been awake for 30 hours? anyways...

[–] [email protected] 1 points 1 day ago

I hope you get some good rest :)