Fijate ahí a ver que pasa..
Código HTML:
Ver original .window {
position: relative;
float: left;
width: 100%;
background-color: aqua;
}
.bar {
position:relative;
float: left;
width: 100%;
background-color: red;
}
<div class="window" id="idwindow"></div> <div class="bar" id="idbar"></div> <script type="text/javascript"> var contentHeightBar = 30;
var contentHeightWindow = 0;
var totalHeightWindows = window.innerHeight;
contentHeightWindow = (totalHeightWindows - contentHeightBar);
document.getElementById("idwindow").style.height = contentHeightWindow + "px";
document.getElementById("idbar").style.height = contentHeightBar + "px";
Cualquier cosa avisás.
Suerte.