I have a element, which has a colored background, and starts after an header. When I set the height to 100%, the element reaches over the bottom so a scrollbar appears. I want it to reach to the bottom but not further. The code should explain it a bit, the red is the div I want to not go further than the bottom. Is there a possible way to do this? I can use JavaScript, html, css, etc...
html,body {
height: 100%;
background-color: green;
}
#text{
height: 100%;
background: #ff0000;
margin-left: 20%;
}
header{
background-color: black;
color: white;
padding: 16px;
}
<header>My Header</header>
<div id = "text">
test
</div>