I'm running into an issue using flexbox in IE11. When using flex-direction: column
the flex-items overlap:
In other browsers (chrome, safari) it looks like this:
.container { display: flex; flex-direction: column; } .flex { flex: 1 1 0%; }
<div class="container"> <div class="flex"> Hello </div> <div class="flex"> World </div> </div>
I've made a codepen to demonstrate the issue:
http://codepen.io/csteur/pen/XMgpad
What am I missing to make this layout not overlap in IE11?
The best solution I've come up with is to set the services images to overflow: hidden and the staff images to nowrap, this prevents images from either gallery from overlapping with any other elements.
Note also that Internet Explorer 11 supports the modern display: flex specification however it has a number of bugs in the implementation.
By default, a flex container aligns flex items in a row (like in your image). As mentioned in an answer, you can override the row default by specifying flex-direction: column, which stacks items vertically.
Definition and Usage The flex-direction property specifies the direction of the flexible items. Note: If the element is not a flexible item, the flex-direction property has no effect.
It is caused by the 0% in your .flex
class. Change it to auto then it should not be a problem:
.flex { flex: 1 1 auto; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With