|
|
|
|
|
by shiomiru
859 days ago
|
|
It's all the more ridiculous because browsers can in fact center divs (block
boxes), in an incredibly straightforward way, using the <center> tag. And all
browsers implement this using a vendor-specific CSS rule (e.g. text-align:
-moz-center). They must be able to do this, because real websites use it, and
there is no other way to implement it using CSS. And yet it's not standardized[1], so if you implement it in a new layout engine
you're left with reverse-engineering what other browsers do (a classic). [1]: OK, I lied. It is standardized... in the HTML standard.
https://html.spec.whatwg.org/multipage/rendering.html#align-... Notice how it's not a stylesheet, not a presentational hint, just prose. It's
because standard CSS can't do what browsers could since before its invention. |
|
https://html.spec.whatwg.org/dev/obsolete.html#non-conformin...