jaypat32
jaypat32

Reputation: 79

Internet Explorer 11 flexbox issues

The code I've written works in every browser I've tested except IE 11. The problem seems to be here:

#wrapper {
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    display: -o-flex;
    display: flex;
    -webkit-flex-direction: row;
    -moz-flex-direction: row;
    -ms-flex-direction: row;
    -o-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
    position: relative;
    top: 1em;
}

If I remove flex, it becomes more manageable, but with them, it shrinks all the content into this long, narrow div that goes on forever.

Would it help if I tested in IE 10?

Upvotes: 5

Views: 17895

Answers (3)

Aarzoo Trehan
Aarzoo Trehan

Reputation: 127

Try display: run-in or display: inline-block instead of display: -ms-flexbox;

Upvotes: 1

jaypat32
jaypat32

Reputation: 79

Simply adding 100% width to the body fixed my problem.

Upvotes: 2

chris cozzens
chris cozzens

Reputation: 517

You just need flex:1; It will fix issue for the IE11

#wrapper {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: -o-flex;
display: flex;
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
width: 100%;
height: 100%;
position: relative;
top: 1em;
flex:1;
}

Upvotes: 6

Related Questions