News for hackers. Stuff that matters.
Re:What No One Told You About Z-Index by No1 on Wednesday January 16, 2013 @02:44AM (#5065857)
Well put rant.

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.

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.
Re:What No One Told You About Z-Index by MDCore on Wednesday January 16, 2013 @05:10AM (#5066166)
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.
Re:What No One Told You About Z-Index by morsch on Wednesday January 16, 2013 @04:40AM (#5066102)
Does that also work when you don't know the width and height of container and centered in advance?