HTML tables....How do I make the 1st row always visible?

Andrew111

Senior member
Aug 6, 2001
792
0
0
I have a fairly large table of data to display on my website, and I was wondering how you get it so the first row of the table is ALWAYS visible. I forget what it's called, I found out how to do it in a MS Office class I took but I forgot how to do it and I have never done it in HTML. I'm pretty sure I've seen it on a website before, but I forgot the address.

To better explain it, I want the table to have its very own scroll bar ONLY for the table....the first row stays visible and the scroll bar allows them to scroll through the rest of the table.
 

kt

Diamond Member
Apr 1, 2000
6,032
1,348
136
Are you talking about a selection box? Like a drop down menu?
 

bunker

Lifer
Apr 23, 2001
10,572
0
71
He's talking about freezing panes, like you can do in Excel.

Not possible in html.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
What might work OK is to use nested tables, row 1 = x columns wide with specified column widths and row2 = 1 column with colspan=x and inside that cell a table. Give the nested table the same column widths (probably subtracting a few pixels from the last column).
 

bunker

Lifer
Apr 23, 2001
10,572
0
71
The only problem with that Dave, is if you have like 400 rows of data you're displaying. You're going to have to scroll down to see it and then you lose the top row, which is what he wants to always see.

The only thing I can suggest would be to have the top row info shown multiple times. Make every 10th or 15th row the same as the first.
 

Andrew111

Senior member
Aug 6, 2001
792
0
0
Dang, I thought you could do that in HTML:( Can you at least give tables their own scroll bars? If you can do that, I could just make a 1 row table with the stuff I always want displayed, than make a table right below that one with it's own scroll bar so they could scroll through it and always see the seperate table right above it.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Originally posted by: bunker
The only problem with that Dave, is if you have like 400 rows of data you're displaying. You're going to have to scroll down to see it and then you lose the top row, which is what he wants to always see.

The only thing I can suggest would be to have the top row info shown multiple times. Make every 10th or 15th row the same as the first.

D'oh! you're right, the nesting will not add scrolling withing the second row.

Can you at least give tables their own scroll bars? If you can do that, I could just make a 1 row table with the stuff I always want displayed, than make a table right below that one with it's own scroll bar so they could scroll through it and always see the seperate table right above it.

Hmm, you could use frames, frame windows do scroll independently of each other. It's awkward, but it willl work.

If you're using script pages (ASP, PHP, cold fusion) you could always only show partial content and have paging links/buttons (like this forum and Google results).