Applying
html, body, .100PercentHeight{
height:100%;
}
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.
If you want to do it via JavaScript this code should work for most DOM browsers...
<div id="fullDiv" style="border: solid 2px black;">
Hello example
</div>
<script type="text/javascript">
var div = document.getElementById('fullDiv');
div.style.height = document.documentElement.clientHeight + 'px';
</script>
<style>
.100PercentHeight{margin:0; height:100%}
</style>
html {
height: 100%;
}
This will not work if you have a DOCTYPE. I'm looking for an answer too, but I have a DOCTYPE. However, there is a way to do it with a DOCTYPE, but it doesn't work with two divs floating left and right next to eachother, try:
(div-name) {
position: absolute;
}
Be aware that this doesn't look good at all when using two divs floating next to eachother. But, it works fine for any other type.
This will work, as an example.
<div style="width:100%; height:100%; border-style:solid; border-width:5px;">
test
</div>
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.
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
}
#full-height{
min-height: 100vh;
}
</style>
</head>
<body>
<div id='full-height'>
</div>
</body>
</html>