Re:What No One Told You About Z-Index
by robin_reala on Wednesday January 16, 2013 @04:20AM
(#5066067)
No it doesn’t: http://www.w3.org/TR/css3-flexbox/. To whit:
<div id="container">
<div id="centered"></div>
</div>
#container {
display: flex;
width: 1000px;
height: 1000px;
background: gray;
}
#centered {
margin: auto;
width: 500px;
height: 500px;
background: red;
}
Of course, we’re waiting on implementations to catch up with the spec: http://caniuse.com/#feat=flexbox . That’s not really the W3’s fault though.That "spec" was a Working Draft in June 2012 and a Candidate Recommendation in September 2012. It's still not final. And browser vendors have implemented prefixed versions (even Microsoft!). I think it is reasonable to criticise the W3 for not finalising something we've been struggling with for over fifteen years.
16 years after CSS was released unto the world, and it still lacks a decent way to center content. Makes me lose all faith in the W3C.