<html>
<head>
<style>
.100PercentHeight{ }
</style>
</style>
<body>
<div class='100PercentHeight'>hihi</div>
</body>
</html>
How can I stretch div to 100% height of page?
<html>
<head>
<style>
.100PercentHeight{ }
</style>
</style>
<body>
<div class='100PercentHeight'>hihi</div>
</body>
</html>
How can I stretch div to 100% height of page?
Applying
should yield the effect you're looking for. You need it on all three.
However, it often doesn't actually do what you think it might, and can be problematic. Faux-column techniques or "sticky footers" tend to work better.
This should work:
However, you may want to add a background colour or border to make sure it works, else you won't be able to see it properly.
Here is the simplest solution that I know of. Unfortunately, however, it doesn't work in Internet Explorer 8 and older, as they do not support the vh (viewport height) unit.