Search code examples
htmlcssinternet-explorerflexboxinternet-explorer-10

Overriding a default value set by the browser


Internet Explorer 10 uses 0 instead of 1 as the initial value for the flex-shrink property. You have to manually set flex-shrink: 1 to each element, or assign a class. How can I automatically set it without assigning it manually or using a class?


Solution

  • You can always set a default rule in your stylesheet.

    Use the universal selector to apply it to all elements.

    * { flex-shrink: 1; }