Re:Centering in CSS
by mattwad on Friday December 18, 2020 @01:29AM
(#25464440)
inline-block was cheating. Plus, for a long time after it was "released" you couldn't rely on browsers actually implementing it. I always used `margin: 0 auto` and if you know the height of an element, you can set the top to be 50%, and use a negative margin half its height.
[ Parent
| on HN ]
Re:Centering in CSS
by mikepurvis on Friday December 18, 2020 @01:35AM
(#25464465)
I'm really hazy going back this far, but wasn't it that it worked in Firefox and Opera, but then IE could be handled using magic HTML comments that served it special separate rules? I know sometimes IE's vendor-specific CSS "expressions" system could be used to compute properties like max-width and so-on that it didn't otherwise support, and it was nice to be able to do that without requiring a JS polyfill.