3

I am facing a flex box issue in IE 11 and have not found any known issue for it. Can anyone suggest solution?

Following example works fine in chrome, firefox and edge, but in IE 11 div with class "second" overflows parent.

http://codepen.io/anon/pen/kXmoYY.

html:

<div class="first">
  <div class="second">
    <div class="third">
        1
    </div>
    <div class="third">
        2
    </div>
  </div>
  <div class="second">
    <div class="third">
        3 text text text text text text text text text text text text text text text text text text text text text text text text text text text text 
    </div>
    <div class="third">
        4 text text text text text text text text text text text text text text text text text text text text text text text text text text text text 
    </div>
  </div>
</div>

less:

.first{
  display: flex;
  flex-direction: row;  
  width: 500px;

  .second{     
    flex: 0 1 auto;   
    display: flex;
    flex-direction: column;       

    .third {     
      flex: 1 1 auto; 
      padding: 10px;
    }
  }
}

IE 11 screenshot below:

enter image description here

Thanks.

Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
  • 8
    IE 11 is known for having many [*flexbugs*](https://github.com/philipwalton/flexbugs). In this particular case, adding `min-width: 0%` to `.second` appears to solve the problem, without breaking anything in other browsers. For more info see [**here**](http://stackoverflow.com/q/35111090/3597276) and [**here**](http://stackoverflow.com/q/36247140/3597276). – Michael Benjamin Aug 19 '16 at 14:21
  • @Michael_B, thanks a lot! – Kirill Nevedrov Aug 19 '16 at 14:33
  • 1
    `min-width: 0%` worked for me! Thank you! – Emily Maskin Dec 01 '20 at 23:25

0 Answers0