4 ms·
You're saying that because they defined centering to occur when I mess with margins that makes centering a feature? Technically yes... I meant an explicit feat
by crimsonalucard 12y ago
You're saying that because they defined centering to occur when I mess with margins that makes centering a feature? Technically yes...
I meant an explicit feature with it's own attribute.
- pcwalton 12y agoSure, and we have that now, with flexbox. "align-items" is the property you're looking for. I find it hard to fault the designers of CSS 2.1 for not being more complex than it was at the time. CSS 2 was a huge advance over CSS 1, so much so that a common feeling at the time was that CSS 2 had so many features no browser vendor would ever implement it all. The authors of CSS 2.1 had to maintain a delicate balance between giving authors the tools they needed and exploding the complexity of the spec, and making vertical alignment fall out of "margin: auto" was one of the ways they did just that.