Before creating this topic I’ve really searched a lot and seen many similar topics,but still couldn’t work this out.Sorry if it’s been already solved.
My code is simply like this one below. When the content isn’t long it works correctly, however when I make it a little longer, the div turns out to be not 100% at the height.
<html>
<head>
<title></title>
<style>
body, html{
margin: 0;
padding: 0;
height: 100%;}
div{width:300px;
background-color: green;
height: 100%;}
</style>
</head>
<body>
<div>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
wont work<br><br><br>wont work<br><br><br>wont work<br><br><br>
</div>
</body>
</html>