0

I'm having a problem on my website where it's displayed correctly in both Chrome, Firefox as well as mobile browsers but displayed incorrectly in ie11. I've used a flexbox to center everything and used auto margins on some of the elements and those margins don't seem to behave the same way in ie.

I've made a small example in jsfiddle : https://jsfiddle.net/pkr63z1c/1/

.container {
  height:500px;
  width:500px;
  background-color:white;
  display:flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.blue {
  background-color:blue;
  width:50%;
  height:10%;
  margin-top:auto;
}

.red {
  background-color:red;
  width:50%;
  height:10%;
  margin-bottom:auto;
}

In both chrome and firefox, the red and blue div are centered, while in ie they're on the bottom of the parent div. This is similar to the problem I have on my website so I'm hoping someone knows how to get the same behavior on ie.

Thanks

0 Answers0