I don't have much experience with Flexbox
but it seems to me that the forced height on the html
and body
tags cause the text to disappear on top when resized-- I wasn't able to test in IE but I found the same effect in Chrome.
I forked your fiddle and removed the height
and width
declarations.
body
{
margin: 0;
}
It also seemed like the flex
settings must be applied to other flex
elements. However, applying display: flex
to the .inner
caused issues so I explicitly set the .inner
to display: block
and set the .outer
to flex
for positioning.
I set the minimum .outer
height to fill the viewport, the display: flex
, and set the horizontal and vertical alignment:
.outer
{
display:flex;
min-height: 100%;
min-height: 100vh;
align-items: center;
justify-content: center;
}
I set .inner
to display: block
explicitly. In Chrome, it looked like it inherited flex
from .outer
. I also set the width:
.inner
{
display:block;
width: 80%;
}
This fixed the issue in Chrome, hopefully it might do the same in IE11. Here's my version of the fiddle: http://jsfiddle.net/ToddT/5CxAy/21/