alt131 - 7:09 pm on Aug 6, 2012 (gmt 0)
Why doesn't CSS have a simple way to vertically align within a div ...
(vertical-align isn't what I'm talking about)
... I can't figure out why such a basic layout function would be left out.
Thanks for asking an interesting question woop01, and great discussion everyone. I haven't kept up with the evolution of this property, but I'd speculate the reason lies in the origins of html/css.
Recall the origin of HTML was sharing primarily text documents, and css focussed on styling the content - which to start was mostly text. Aligning vertically within a block element is more about using style to lay out elements. Take a quick scan of the css1 [w3.org] recommendation - there's very little about "lay out", and that's reflected in the concept of 5.4.4 'vertical-align' [w3.org] being dealt with in the "Text Properties" sub-section:
Also recall that while css2.1 contains more tools for laying out elements, it is still old and retains the original focus. Hence vertical align survives as a tool for dealing with text/line alignment 10.8.1 Leading and half-leading [w3.org].
To me, the issue isn't that a way to align elements vertically was "left out".
To me the issue is that coders suddenly expected css to provide a way to lay out page elements, even though it was designed to style the content. That doesn't make css deficient. However, those expectations did mean re-thinking the function of css - one of the reasons it has taken so long to get any "progress" on newer versions.