Well, Although not perfect, I'll go with an answer:
The problem with this solution is that scrolling will work only when hovering the scrollable content, meaning that you wont be able to scroll if your mouse is outside the big text container. That being said, thats what I thought you could do:
First of all, wrap the #casing
div in a #casing-wrapper
div, getting something like this:
<div id="casing-wrapper">
<div id="casing">
lots of content here...
</div>
</div>
Then you'll need to style this new div this way:
#casing-wrapper {
width: 800px;
position: fixed;
left: 50%;
margin-left: -400px;
top: 90px;
overflow-y: scroll;
}
Also you'll need to add some jQuery to set #casing-wrapper
's height depending on window's height:
jQuery(document).ready(function(){
setWrapperHeight();
jQuery(window).resize(function(){
setWrapperHeight();
});
});
function setWrapperHeight() {
var height = jQuery(window).height();
var margin = 90;
jQuery("#casing-wrapper").css({"height":height - margin});
}
And that's all. Doing this, we created a new layer containing the scrollable content that has the window's height minus 90px. Those 90px come from your header's height plus it's top margin. Since the wrapper has position: fixed
, it won't move on scroll, but it's content will. On top of that, with the overflow-y: hidden;
property we clip any overflowing content, resulting in the text not being visible under your header.
Anyway, in my opinion the result of letting the letters go under the header is cool, and I won't change it :P