In IE11, my site is completely broken. The problem arises from flex: 1 1 0%;
which I use everywhere thanks to autoprefixer and postcss-flexbugs-fixes .
The site works on IE when I change it to flex: 1 1 auto;
, but then some behavior changes (for example, one flexbox with two children flex: 1 1 auto;
who do not occupy exactly the same space). Therefore, this solution breaks my projects in other browsers (making it much nicer - not broken - on IE11).
How can people build their sites using flexbox in IE11?
Edit: here is a pen that highlights the problem I am facing: https://codepen.io/Zephir77167/pen/GMjBrd (try it in Chrome and IE11).
Edit2: here is the code:
HTML:
<div id="a" class="flex">
<div id="b" class="item flex-1">
Hey
</div>
<div id="c" class="item flex-0">
Ho
</div>
<div id="d" class="item flex-1">
Heyheyheyheyho
</div>
</div>
<br />
<div id="a" class="flex">
<div id="b" class="item flex-1-variation">
Hey
</div>
<div id="c" class="item flex-0">
Ho
</div>
<div id="d" class="item flex-1-variation">
Heyheyheyheyho
</div>
</div>
CSS
* {
box-sizing: border-box;
}
#a {
background-color: pink;
height: 300px;
width: 100px;
}
#b {
background-color: green;
height: 50px;
}
#c {
background-color: blue;
height: 100px;
}
#d {
background-color: yellow;
height: 150px;
}
.flex {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
.item.flex-0 {
flex: none;
}
.item.flex-1 {
flex: 1 1 0%;
}
.item.flex-1-variation {
flex: 1 1 auto;
}