4 ms·
And this is why we are in no way better-off with Chrome as the #1 browser than we were with IE as the #1 Browser. In order to center content reliably across bro
by anonbanker 11y ago
And this is why we are in no way better-off with Chrome as the #1 browser than we were with IE as the #1 Browser. In order to center content reliably across browsers, we have to implement browser-specific hacks, because flexbox was only finalized in May of this year. This has been a struggle since HTML+, so almost 20 years now, just to center content.
Thanks Google, Apple and Microsoft.
Meanwhile, I have web pages on my hard drive that I designed in 1999 with vertical alignment (amongst other tricks), that worked in Netscape 4.x, Seamonkey 0.86, and still work in Firefox 42. and I never needed a -moz prefix.
- Nadya 11y agoWhat? Flex doesn't need a prefix and hasn't for ages (since version 20. It's on 50 now) Furthermore, it's best that features are behind prefixes to be used for progressive enhancement and any major browser implements new features behind a prefix before it is accepted. There is no "cross browser hacks" for any evergreen browser. Except, ironically given your statement, IE has a buggy implementation. Edge supports it and Microsoft is deprecating IE<11 and will hopefully fix the issues in IE11. The big issues can be avoided by not declaring a min-height. http://caniuse.com/#feat=flexbox http://caniuse.com/#feat=flexbox
- anonbanker 11y agoyes, beta features should be behind a prefix. that's all established. However, if vertical alignment is still prefixed in 2015, I don't think I need to submit more for my case, downvoted as it may be.
- Nadya 11y agoBut it isn't, which is why you're getting downvoted. Although the outdated example is largely to blame.
- deleted 11y ago[deleted]
- d-Pixie 11y agoBarring IE, that requires the old syntax and or had bugs, support for the standard flexbox is now in every modern browser: http://caniuse.com/#feat=flexbox http://caniuse.com/#feat=flexbox Maybe it's time to stop blaming the standard and start blaming 1. Users who do not use modern browsers or 2. Developers that don't update/use the new toys out there :)
- debaserab2 11y agoNo you don't. That's just one of several ways you can vertically center something.
- anonbanker 11y agocan you add to the ones already submitted?
- Raphmedia 11y agoThe bible of CSS centering: https://css-tricks.com/centering-css-complete-guide/ https://css-tricks.com/centering-css-complete-guide/ There is this too: http://willkoehler.net/2014/08/28/vertically-align-content-with-css-using-this-one-weird-trick.html http://willkoehler.net/2014/08/28/vertically-align-content-w... There are a lot of ways, really. As someone who writes CSS daily (css, less and scss), I've yet to understand how some people can have any issues at all with CSS. Sure, it's quirky but you can pretty much master it in a few months at most. (That being said, I make my life a lot more easier by using tools such as autoprefixers, library of mixins that allow me to summon arcane CSS declarations at will, etc.)