← Back to context

Comment by rezonant

31 minutes ago

And has a dead simple one today.

Also worth noting simple horizontal centering of divs was never a problem, margin: auto was defined in CSS Level 1 in 1996 [1].

It was vertical centering that took a very long time to crack, which really became trivial with Flexbox which was first drafted in 2009[2] but became available unprefixed in browsers between 2012 and 2014 [3] about 13 years ago.

[1] https://www.w3.org/TR/REC-CSS1-961217

[2] https://www.w3.org/TR/2009/WD-css3-flexbox-20090723/

[3] https://caniuse.com/flexbox

Subnote: I'm not counting the display: table hacks.