In the code below, Foo is fixed height. The bar should take the rest of the space vertically. But the bar is overflowing, taking up more the rest vertically, and there is always a scroll bar.
body {
display: flex;
flex-direction: column;
}
.foo {
width: 100%;
height: 30px;
border: 1px solid red;
}
.bar {
width: 100%;
flex: 1;
border: 1px solid blue;
}
iframe {
border: 0;
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
<div class="foo">
This is Foo.
</div>
<div class="bar">
<iframe id="simple" src="simple.html"></iframe>
</div>