This is getting pretty hypothetical. It's undeniable that IE 11 acts differently. Here's one way of dealing with the situation:
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Flex Iframe</title>
<style>
html {
overflow-y: hidden;
}
body {
display: flex;
flex-direction: column;
margin: 0;
height: 100vh;
}
header {
background: yellow;
}
main {
display: flex;
flex: 1;
}
span {
background: green;
}
iframe {
background: tan;
height: 100vh;
}
</style>
</head>
<body>
<header>Some text</header>
<main>
<span>Hello, world!</span>
<iframe></iframe>
</main>
</body>
</html>
But it could depend upon what's in the iframe and/or other elements on the page. That might dictate that some other solution be sought.
I'd never heard of vh before this. So I did a little bit of reading on it. How these things were handled before it was available was usually by using javascript. So, if the above isn't suitable, perhaps a javascript workaround could be used.
It's also worth noting that the iframe element was almost dropped at one point. As a result it's one of the least standard elements that one could use. Just playing with it now, if you use an object, it works - but only if there's a data attribute with content (I only tried HTML content, there might be limits on other sorts, as to whether they would be as effective as HTML at allowing IE 11 to behave well with this):
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Flex Object</title>
<style>
body {
display: flex;
flex-direction: column;
margin: 0;
height: 100vh;
}
header {
background: yellow;
}
main {
display: flex;
flex: 1;
}
span {
background: green;
}
object {
background: tan;
}
</style>
</head>
<body>
<header>Some text</header>
<main>
<span>Hello, world!</span>
<object data="12345.htm"></object>
</main>
</body>
</html>
12345.htm:
I tried the same thing (using 12345.htm as the src for the iframe) and that did not work.
Bookmarks