I have a very strange issue on ie9 where a div with a max-height (set with calc() and vh) and overflow auto is not scrolling.
You can see what is happening by clicking on this image (if the GIF does not load here):
My HTML:
<div class="modal">
<div class="modal__title">Modal Title</div>
<div class="modal__body">
<p>When I am too tall, I should scroll on ie9, but I don't.</p>
</div>
<div class="modal__footer">Footer here</div>
</div>
Relevant CSS:
.modal {
min-width: 500px;
max-width: 800px;
border-radius: 4px;
max-height: 65vh;
overflow: hidden;
background-color: white;
position: fixed;
top: 15vh;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.modal__body {
max-height: calc(65vh - 120px)); // 120 is the combined height of the header and footer
overflow-y: auto;
}
I don't understand why this is happening, as ie9 support vh, calc() and max-height. Any ideas?
JSFiddle Demo: https://jsfiddle.net/sbgg5bja/3/
max-heigh:
tomax-height:
. Maybe the issue? – Superordinate