Open Undistraction opened 9 years ago
There are a lot of differences between your example and mine. Two of those things appear to be significant:
position: absolute
.align-items: center
.If I remove those, it appears to work, at least as far as I can tell: http://codepen.io/anon/pen/gpEREr?editors=110
Perhaps I should add that the container fix needs to be just a pure container with only the CSS I show in my example. What do you think?
I think we are talking about two separate issues:
I have a flexbox based layout that involves a centered container comprising of a header and body.The container has a minimum height to prevent it collapsing too much if there is little content in its body. It also has a max-height defined as a percentage of its container.
The header is a fixed height, and the body is set to overflow-y: auto. In Chrome, Safari and Firefox, this means:
However in IE11, if the body content increases in height beyond the available space it (sometimes) extends out beyond the confines of the container (resizing the window sometimes triggers this issue and sometimes fixes it).
There is a Codepen here
I thought this was related to 3. min-height on a flex container won't apply to its flex items, which states:
However the fix doesn't work (setting
flex-direction: column
on the wrapping flexbox), as can be seen in the Codepen.As a bonus bug which may or may not be related, Chrome fails to correctly resize the nested Flexbox if the height of the viewport is increased, although decreasing the viewport height immediately triggers the correct layout. Happy to add this as a separate issue if you like.