Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking header row of a table

Status
Not open for further replies.

tmryan

Programmer
Dec 22, 2000
73
US
Is there a way to lock the header row of a table in HTML? I have a large table displaying - and when I scroll down, I'd like the header row to stay fixed on the page. How can I do this?

Thanks
Tim Ryan
 
Hi!

Has anyone responded to this yet - maybe somewhere else? I have the same problem and it's driving me nuts!

I have tried creating a frames page - with static data in the top frame and scrolling data in the bottom one.

However, as the frames are set to "resize in browser", the bottom frame 'squashes' my cells to allow for the scroll bar, thus knocking the header row (in the top frame) out of kilter!

Please, please, please someone help!!!

Thanks in advance..
NKA NKA
 
Its a bit over my head but I see two possibilities,

1. Frames, should be simple enough! But I dont know how to solve your problem NKA.

2. The other option is to make the header cell a table of its own. A nifty bit of Java script should lock your header TABLE in position at the top of your page. There are lots of these free scripts around, try
If nothing else then I hope i at least gave you some ideas!

É
 
the solution is a persistent layer. Inside this persistent layer, make a table with just one row and that will be your header row. in another layer make the rest of the table. If you gimme some time i can make a mock page for you and upload it for you to study Ranjan
:: I earn because I learn ::
 
Thanks Ranjan. I'll check it out.

Tim Tim Ryan
PROGRESS Developer
 
NKA You could set scrolling auto in the top frame and give the row a large enough pixel size so that the scroll bar won't show.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top