What's Going On
You'd like to have a container that is all of the page minus a set height, (from a header above it).
You can do with with CSS (No JS!) and with full old browser compatibility, just using position
ing tricks.
First, set your #globalWrapper
to position:relative
, to catch anything that is position
ed absolute
ly inside it.
Next, set your .ScrollableWrapper
to position:absolute
, with top:45px
(instead of margin-top:45px
, and left
, right
, and bottom
to 0
.
Code
#globalWrapper {
overflow: hidden;
height: 100%;
background-color: white;
position:relative;
}
.ScrollableWrapper {
top: 45px;
left:0;
right:0;
bottom:0;
border: 5px solid red;
position:absolute;
overflow-y: scroll;
}
Note, .ScrollableWrapper
must NOT be set to height:100%
.