html_code_clinic thread: Target Attribute not functioning correctly in a client-side image map in a frame
It's is a bit jerky, but this code allows you to keep the frames at the
top and bottom:
<html>
<body onscroll="doScroll()">
<span style="position:absolute;top:0;left:0;height:50;width:100%;background:red;" id="spnTop">
The top frame
</span>
<span style="position:absolute;top:350;left:0;height:50;width:100%;background:red;" id="spnBottom">
The Bottom frame
</span>
<br><br><br>
code for rest of page...
<script>
function doScroll()
{
spnTop.style.posTop = document.body.scrollTop;
spnBottom.style.posTop = document.body.scrollTop + 350;
}
</script>
</body>
</html>
> Thanks Imar, you are of course exactly right. I should know I've written
> it myself in the HTML Programmer's Reference, HTML is case sensitive! It's
> always the little things you end up overlooking!
>
> Thanks to everybody else for replying, in justification for using frames,
> I wanted a site where you could scroll the middle body page and yet have a
> non-scrollable separately loaded titlebar and menu bar at the top and
> bottom of the page. If I could fix parts of a page, while have others
> scrollable, without using frames, that would be ideal. However the only
> solution I could find in HTML 4.0 is specifying Table headers and footers
> and allows you to scroll the content of the table body (as I myself put in
> the HTML prog ref), but no browser (not even Netscape 6, although haven't
> tried the latest Mozilla release) seems to currently support this.
> Hopefully both IE6, and updates to Netscape 6 will rectify this when they
> get released.
>
> Cheers,
> Chris