Search code examples
javascriptcssinternet-explorerflexboxinternet-explorer-10

IE10: Unable to set any flex style properties via Javascript


Here's what I'm trying to do:

var node = document.getElementById('some-object');
node.style.flex = '480px 1 0';

Question is, why doesn't the snippet above work on IE 10?

I can set the flex or flexBasis or flexGrow or whatsoever in IE11 and above, so why doesn't it work in IE 10?


Solution

  • This doesn't work because flexbox styling isn't supported in IE versions older than 11.