Let's say I have a simple page structure like this:
body {
overflow: hidden;
}
body>div {
border: 1px solid black;
}
.container {
overflow: auto;
height: 97vh;
width: 97vw;
}
.content {
width: 5000px;
height: 5000px;
}
<body>
<div class="container">
<div class="content">
</div>
</div>
</body>
As you can see in maximized window, height of element content
is 97% of viewport height, which is what I expect. But as soon as I start to decrease the height of the browser window, this element loses its 97%, approaches 100%, until it reaches a point where it is almost impossible to see the bottom scroll bar.
Shouldn't it still be at 97%? And how can I achieve it?