To vertically and horizontally center a div with flexbox I simply apply these rules to it's parent
display: flex;
align-items: center;
justify-content: center;
So that it will be displayed like so:
However when there's more content in the div then there is height in the viewport, it makes the content overflow the webpage so it isn't visible, and impossible to scroll up- like so: jsfiddle.net/xk1z6wpa/2
I need the div to not overflow the webpage from the top, rather stopped before reaching it thus only overflowing from the bottom- like so:
How can I accomplish this?