Earlier quoted context omitted.
i use this waty to solve my center problem,truly it works,but it lead other problems,like this: test test test test test test test test the flex will ruin the layout of the div,so how can i solve this problem?thank you
Spans are stripped out by Outlook 2010 in HTML mail. This is not edge case, as you may think. Most corporates are still on Outlook 2010 (and IE 6, especially large banks in the UK).
How to Center in CSS
171–180 of 297 posts
Re: How to Center in CSS
#172Earlier quoted context omitted.
i use this waty to solve my center problem,truly it works,but it lead other problems,like this: test test test test test test test test the flex will ruin the layout of the div,so how can i solve this problem?thank you
Spans are stripped out by Outlook 2010 in HTML mail. This is not edge case, as you may think. Most corporates are still on Outlook 2010 (and IE 6, especially large banks in the UK).
The HTML email world is stuck with HTML 4.1, inline CSS and many corner cases (worse than the IE6 era!).
Re: How to Center in CSS
#173Earlier quoted context omitted.
And anyone who wants to browse with JavaScript disabled…
People who disable features of their browser on purpose will always be getting a degraded experience. No way around that.
Re: How to Center in CSS
#174Earlier quoted context omitted.
A basic rule of universe is that complexity remains, you can merely shift it around. The table layout algorithm might be incredibly complex, but I'd rather have a browser writer have the headaches than me.
> The table layout algorithm might be incredibly complex, but I'd rather have a browser writer have the headaches than me. Completely disagree. The Unix philosophy is right when it comes to layout: you want to be simple, fast, and predictable . This attitude is also why we are in a situation where the Web is slow compared to native platforms. Simple things tend to be fast things. Complex things tend to be slow things…
Re: How to Center in CSS
#175The mere fact that a site like this can exist and not be a joke is proof that CSS is still badly broken. I should be able to center things by writing: foo { align: center; valign: center; }
Re: How to Center in CSS
#176As others said, flexbox is a complete replacement for all layour hacks in CSS. This site helped me understand flexbox: http://flexboxin5.com/ Browser support: http://caniuse.com/#feat=flexbox
That site is completely broken in Safari. Don't think we're ready for flexbox just yet.
Re: How to Center in CSS
#177Earlier quoted context omitted.
Indeed I have non-TABular data and yet I should use TABle-cell? I'll just stick with the actual then. cleaner. But the real problem is "use divs". plural. so already breaking the #container_of_container cruft rule. I'd rather write some javascript with overly nested callbacks and leave the html clean. thanks.
Just a practical consideration, but the HTML table tag is actually a lot more restrictive ( can only contain or , so no wrapping span to regroup some table rows) than using s. Can be important depending on third party libs.
Re: How to Center in CSS
#178Earlier quoted context omitted.
A basic rule of universe is that complexity remains, you can merely shift it around. The table layout algorithm might be incredibly complex, but I'd rather have a browser writer have the headaches than me.
> The table layout algorithm might be incredibly complex, but I'd rather have a browser writer have the headaches than me. Completely disagree. The Unix philosophy is right when it comes to layout: you want to be simple, fast, and predictable . This attitude is also why we are in a situation where the Web is slow compared to native platforms. Simple things tend to be fast things. Complex things tend to be slow things…
Re: How to Center in CSS
#179As others said, flexbox is a complete replacement for all layour hacks in CSS. This site helped me understand flexbox: http://flexboxin5.com/ Browser support: http://caniuse.com/#feat=flexbox
What's the best polyfill for flexbox?
Re: How to Center in CSS
#180Earlier quoted context omitted.
Spans are stripped out by Outlook 2010 in HTML mail. This is not edge case, as you may think. Most corporates are still on Outlook 2010 (and IE 6, especially large banks in the UK).
Outlook 2007+ use MS Word as email layout engine, instead of Trident (Internet Explorer). MS Word "web view" is based on Frontpage (which itself forked of trident) and produces broken HTML 4 output. The HTML email world is stuck with HTML 4.1, inline CSS and many corner cases (worse than the IE6 era!).
It might be for the better, actually. HTML5 and CSS3 are Turing-complete[0] so I can imagine that the moment they would be allowed, some clever marketing company would figure out new and impressive ways to use the new features to scam people. Er. I meant, "provide value-added content".
[0] - with user closing the loop, see http://beza1e1.tuxen.de/articles/accidentally_turing_complet... for links to an example.