Consider the following code-
<div class="header">
<span>Heading element</span>
</div>
<div class="mainContainer">
<span>Main content</span>
</div>
.header
{
height:50px;
border:1px solid black;
}
.mainContainer
{
height:70vh;
border:1px solid black;
}
I want mainContainer to take the full height of the screen. But there is another div on top of it which has his own height of 50px. Now if I give the height of 100vh to mainContainer then the scrollbar appears on the screen which is obvious but how to avoid it?