• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1184
  • Last Modified:

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!

0
gdemaria
Asked:
gdemaria
  • 2
1 Solution
 
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
 
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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now