i'm getting an unexpected vertical scrollbar when resizing the window when I have an image in a flexbox container. The image has a max-width and max-height in a flex:1 column flexbox container. All is good in some window ratios, but if the window is small in height, I get a vertical scrollbar, with some blank space under the image.
Any ideas why?
CSS
body{
display:flex;
flex-direction:column;
margin:0;
height:100vh;
}
#cont{
flex:1;
}
#cont img{
max-width:80%;
max-height:80%;
}
HTML
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="cont">
<img src="https://c1.staticflickr.com/3/2547/4011378891_ca862aeb8f_b.jpg" />
</div>
</body>
</html>
Here is a fiddle to illustrate: https://jsfiddle.net/sym8qb4t/
Resize the window in height and a scollbar will appear at some point.
Thanks!