Does IE9 not support display: inline-flex at all?
As you can see here: Can I use FlexBox? Flexbox is not supported in IE9
EDIT : Based on OP comment to answer:
if there's any way to make it work in IE9, with prefix or something?
here is a SO users' answer from another related question:
I understand from your question, that you are aware of the fact that IE9 does not support flexbox. A polyfill for flexbox, named flexie.js, does exist (not maintained afaik), but it works using the old 2009 syntax of flexbox.
Using the old syntax is of course not recommended, since the 2009 syntax is really outdated and many browsers won't recognize it anymore. But, you can try to use Autoprefixer, which transforms new-syntax rules to old-syntax rules (while preserving the new-syntax for browsers that do support it).
There are caveats - You won't be able to use inline-style, you would have to write your styles in CSS files, and I don't think it supports dynamic changes to the DOM.
Disclaimer: I haven't tried that method with IE9 + flexie.
Comments
-
maverick almost 2 years
I've been looking around StackOverflow and even else where to find if
display: inline-flex;
works in IE9. I posted a question before this when I had trouble with expanding a width dynamically, question here.The answer helped me out, thank you who ever you are! Now that I've fixed the issue and it works fine in Chrome, Opera, Mozilla, Safari, IE10+, I still have trouble making this work in IE9.
I've also tried to add pre-fix for
display: inline-flex;
such asdisplay:
-webkit-inline-box
,-ms-inline-flexbox
, and so on.The problem I had which fixed the whole deal was
width: auto;
anddisplay: inline-flex;
Working fiddle here
How can I make this to work in IE9?
-
maverick over 9 yearsYes, I also visited that page and saw that flex didn't work. But my question is if there's any way to make it work in IE9, with pre-fix or something? Something that goes around, and makes it possible...
-
geebru over 9 years8/9 just flat out don't support it. So not really. Table-cell is as close as you'll get.
-
maverick over 9 yearsAll right. So there's no way to make it work in IE9?
-
maverick over 9 yearsOne more question though, if I use this flexie.js as you suggested, should I use it inside <!-- [if IE9]> etc...?
-
dippas over 9 yearsThat's not my suggestion at all, it was only a search that I did for your question in order to try a workaround and I find that answer in another question here in SO.. but let me see about that polyfill
-
dippas over 9 yearstake a look at this demo: github.com/doctyper/flexie/blob/master/demo/index.html
-
maverick over 9 yearsOh, I didn't mean it like that. But if I'm going to use this, is it the best way to keep the CSS rules inside <!-- [if IE9]>? Because I don't want my current stylesheet and javascript to collide just because I'm trying to make my timeline slider work with IE9... Do you get where I'm going?