this post was submitted on 19 Aug 2024
324 points (98.8% liked)

Programming

17313 readers
274 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 3 months ago (1 children)

no-trick pure CSS

What do you mean? How else would you center content without CSS?

[–] cley_faye 17 points 3 months ago (1 children)

There were tons of options with multiple HTML elements with a sequence of CSS properties to reliably provide vertical centering (and also use vertical space at the same time) back in the days.

Now, between flex and grid (mainly flex for me, I find them more convenient) all the HTML scaffolding we used to make this work can be removed to get the same result. That's what I mean with "no trick".

[–] [email protected] 1 points 3 months ago

Oh, I thought you meant you were centering in some special way.