by gizzlon · 12y ago · 0 comments
That's kind of the point.. you should not need to have a page to showcase different techniques for something this basic.
I, for one, does not have to deal with this. But as and outsider it seems strange that simple things are so hard. Maybe web developers have gotten so used to dealing with things like this that they don't see how convoluted it is?
Not really, most of the complexity is of the ill-thought design they started with, and the LACK of options for certain things.
Initially the envisioned CSS as a styling technology, so layout was an afterthought. Even the messy floats hacks (those one that replaced tables) wasn't something that was though of specifically as a complete layout solution.
We had to wait 10+ years, to have actual layout solutions catering to the needs of web designers: Flexbox, Regions, Multi-Column layout and Grid Layout -- and of course those are still not implemented totally by browser vendors, give a few years wait for that too.
EDIT: I mean, what freedom would have been lost when it was designed to work like this, not talking of changing it now.
.outer {height: 1200px; width: 800px;}
.inner {margin: auto;}
<div class="outer">
<p class="inner">This is centered vertically</p>
<p>But where should this go?</p>
</div>
And what if both p elements had the `inner` class?