I'm trying to vertically center a box by using display: flex;
, while it's working when the box is small enough, but when the box exceeds the window height, part of the content will be cut off.
Working example: http://codepen.io/woutr_be/pen/bVQXLe
Example with large height: http://codepen.io/woutr_be/pen/KdrOZm
It seems to be related to the body: { height: 100%; }
, but when I remove that, the box isn't centered anymore: http://codepen.io/woutr_be/pen/MazNrE
I can't figure out how to make it work when the box has a large height.