This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes independently scrolling sections in JSP page, and IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "independently scrolling sections in JSP page, and IE" Watch "independently scrolling sections in JSP page, and IE" New topic

independently scrolling sections in JSP page, and IE

Bob Grossman
Ranch Hand

Joined: Dec 18, 2008
Posts: 69
Not sure this is the best forum for this question, but here goes. I have a JSP page that is divided into three sections; I want the sections to scroll independently, keeping the top and bottom sections in fixed positions when the middle section scrolls. I found some code on the Web that used CSS to do this, and it included workarounds for Internet Explorer. The code works beautifully for all browsers except Explorer. Looking at the attachments, the first shot shows the desired page in Chrome. Notice the scroll bar on the middle section; when I scroll it, the top and bottom sections remain properly fixed. The second two screen shots show the same page opened in Internet Explorer 9. Notice the scroll bar of the middle section has now become a whole-window scroll bar, so that the bottom section scrolls up and continues to cover the middle section when I try to scroll down in the middle section.

Here's the CSS defining my three sections:

In the examples, the values of headerHeight and footerHeight are 80 and 135.

I've tried inserting overflow:hidden; lines in various places, but no joy. Any insight into what I could do better would be most appreciated.

[Thumbnail for chromSnapshot.PNG]

[Thumbnail for ieSnapShot1.PNG]

[Thumbnail for ieSnapShot2.PNG]

I agree. Here's the link:
subject: independently scrolling sections in JSP page, and IE
It's not a secret anymore!