Fixed Report Headers using only page scrollbars

I'm not sure if this is possible, but it would be really great for me if it could be done..

I have a long table and I would like to get a fixed header at the top of it.  However, I really don't want to add a second scroll-bar (an in-page scroll bar) but rather just have the one main window scroll bar.

So, this is my idea...

I am wondering if when scrolling the page, if the page header can scroll away, but once the table header gets to the top of the page it would "stick" there.  While the rest of the table scrolls by..

------------------------------------------------------

PAGE HEADER   and  LOGO

------------------------------------------------------
Menu
------------------------------------------------------

..Page Title and some text content here..

--------------------------------------------------------------
Table Header (the thing I want fixed at the top)
--------------------------------------------------------------
Big
Long
Table
Data
...
...


In the example above, when the user scrolls the window's scroll bar, the page header, menu, and opening text would all scroll off the screen, but the table header would stick at the top of the page while scrolling continues to show the rest of the table data..

If that's not possible, how would you best handle this?   I tried paging, but the client really prefers a lot of data on the page, so fixed headers is desirable.

Thanks!

LVL 39
gdemariaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

IsisagateCommented:
Can always used frames to anchor the header at the top and have the scrollbar attached to the content...

You can use Javascript to try and position the headers at the top of the current scroll position with absolute positioning and z-index....

I don't know of a CSS solution be interesting if someone else does.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gdemariaAuthor Commented:
Thanks for your response.

> Can always used frames to anchor the header at the top and have the scrollbar attached to the content

Here is an example of just placing a div as a fixed header
http://limpid.nl/lab/css/fixed/header
I think I would do somethink like that over frames.  But my intent was to try and allow the upper part of the page to scroll as I don't want to waste the space for the page header always being there taking up space when scrolling.

> You can use Javascript to try and position the headers at the top of the current scroll position with absolute positioning and z-index....

That's an interesting idea to lock only the table header into position.  The table data would appear above it when scrolling and may look a bit odd, but its an interesting idea.

0
gdemariaAuthor Commented:
thanks for your input!  Guess this isn't doable
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.