Any browser implementing THEAD?

B

Bram de Jong

Scrolling table bodies independently from the table heading would be very
useful to me. Does anyone know a browser implementing the THEAD element, or
perhaps something similar?

Thanks,
Bram.
 
T

Thomas Jollans

Bram said:
Scrolling table bodies independently from the table heading would be very
useful to me. Does anyone know a browser implementing the THEAD element, or
perhaps something similar?

Thanks,
Bram.

Use CSS to scroll:

<style>
.mytable{ overflow:scroll; }
</style>
<table><tr><td>
<h2>heading</h2>
</td></tr><tr><td><div class='mytable'>
<!-- the table you want to scroll here -->
</div></td></tr></table>

You shoud also specify the height of the div. It would, of course, have
been better to use CSS instead of the table in my example.

Thomas
 
J

Jukka K. Korpela

Bram de Jong said:
Scrolling table bodies independently from the table heading would be
very useful to me. Does anyone know a browser implementing the THEAD
element, or perhaps something similar?

The required implementation is that browsers parse the element, nothing
more; no specific effect on rendering is required.

It seems that Mozilla actually tries to implement THEAD well and support the
CSS scroll property for it (IE doesn't, for some odd reason), but my tests
have been rather disappointing. It simply doesn't seem to get it right -
hard to describe the ways it fails, sorry.
 
B

Bram de Jong

Use CSS to scroll:

<style>
.mytable{ overflow:scroll; }
</style>
<table><tr><td>
<h2>heading</h2>
</td></tr><tr><td><div class='mytable'>
<!-- the table you want to scroll here -->
</div></td></tr></table>

You shoud also specify the height of the div. It would, of course, have
been better to use CSS instead of the table in my example.

Thomas

Interesting idea. Unfortunately, I have multi-column data tables and the
problem is to synchronize the column headings with the column values. It
gets even more difficult when horizontal scrolling is needed.
Bram.
 
A

Andreas Prilop

Jukka K. Korpela said:
It seems that Mozilla actually tries to implement THEAD well and support the
CSS scroll property for it (IE doesn't, for some odd reason), but my tests
have been rather disappointing.

And Mozilla *prints* THEAD at the top of each page for long tables.

BTW: Your lines seem a bit too long.
 
S

spaghetti

The required implementation is that browsers parse the element, nothing
more; no specific effect on rendering is required.

It seems that Mozilla actually tries to implement THEAD well and support the
CSS scroll property for it (IE doesn't, for some odd reason), but my tests
have been rather disappointing. It simply doesn't seem to get it right -
hard to describe the ways it fails, sorry.

I saw a Javascript solution to this that worked well in IE and Mozilla, and
degraded. I thought it was a common thing (I didn't have any use to bookmark
it) and now I can't seem to find it. It was relatively complex though, which
might be why it wasn't popular.

I will do some hunting. Maybe I've gotten it mixed up with something else.
 
M

Mark Parnell

Sometime around Tue, 25 Nov 2003 20:00:23 +0000 (UTC), Jukka K. Korpela is
reported to have stated:
It seems that Mozilla actually tries to implement THEAD well and support the
CSS scroll property for it (IE doesn't, for some odd reason), but my tests
have been rather disappointing. It simply doesn't seem to get it right -
hard to describe the ways it fails, sorry.

If you can't describe it, do you have an example URL?
 
N

Nico Schuyt

Bram said:
Scrolling table bodies independently from the table heading would be
very useful to me. Does anyone know a browser implementing the THEAD
element, or perhaps something similar? And:
I have multi-column data tables and
the problem is to synchronize the column headings with the column
values. It gets even more difficult when horizontal scrolling is
needed.

Duplicate the table.
Place one in a div with fixed height and overflow:hidden (your headings)
The other one in a div with overflow: auto below the first one (scrollable
content).

Good luck,
Nico
 
B

Bram de Jong

"> > Scrolling table bodies independently from the table heading would be
The required implementation is that browsers parse the element, nothing
more; no specific effect on rendering is required.

It seems that Mozilla actually tries to implement THEAD well and support the
CSS scroll property for it (IE doesn't, for some odd reason), but my tests
have been rather disappointing. It simply doesn't seem to get it right -
hard to describe the ways it fails, sorry.

Thanks. I'll have a look at Mozilla.
Bram.
 
J

Jukka K. Korpela

Mark Parnell said:
If you can't describe it, do you have an example URL?

Sorry, my tests are mostly sketchy and obscure even to myself, since
I created them when writing my CSS book and decided to say rather
little about this - just describe the idea and say that it's at present
mostly just a good idea. I just remember the disappointment. :-(

But to illustrate it a bit, I created
http://www.cs.tut.fi/~jkorpela/styles/propidx.html
which is appendix F (property table) of the CSS 2.1 draft, with minor
modifications, mainly with the added style sheet

tbody { height: 10em;
overflow: scroll; }

and with <tbody> markup added into the document (which oddly lacked
it). Sounds simple, and Mozilla 1.4 sort-of supports it, but the
columns aren't adjusted (the columns in <thead> have widths different
from those in <tbody>), and this oddly varies - a Reload may make the
situation _worse_.

I vaguely remember having tried to fix things by using table-layout:
fixed (an obvious attempt, isn't it?)´, with catastrophic results.

And if I try to improve the overall appearance by adding
table { border-collapse: collapse; }
then the whole table virtually collapses.
 
M

Matthias Gutfeldt

Jukka said:
But to illustrate it a bit, I created
http://www.cs.tut.fi/~jkorpela/styles/propidx.html
which is appendix F (property table) of the CSS 2.1 draft, with minor
modifications, mainly with the added style sheet

tbody { height: 10em;
overflow: scroll; }

and with <tbody> markup added into the document (which oddly lacked
it). Sounds simple, and Mozilla 1.4 sort-of supports it, but the
columns aren't adjusted (the columns in <thead> have widths different
from those in <tbody>), and this oddly varies - a Reload may make the
situation _worse_.

Seems to look fine in my Mozilla 1.3, the columns have the same width in
thead and tbody: <http://gutfeldt.ch/matthias/temp/scrolling-tbody.gif>.

The only thing I would change is the vertical height so there is less
scrolling.


Matthias
 
M

Mark Parnell

Sometime around Fri, 28 Nov 2003 10:58:10 +0100, Matthias Gutfeldt is
reported to have stated:
Seems to look fine in my Mozilla 1.3, the columns have the same width in
thead and tbody: <http://gutfeldt.ch/matthias/temp/scrolling-tbody.gif>.

Moz 1.5 gets it almost right - a couple of the columns are slightly off -
though they sort themselves out about halfway down the table. Refreshing
seems to correct it every time. As does loading the page in a viewport high
enough to not have a scrollbar.

When I added table { border-collapse: collapse; } it didn't totally
collapse, but it is still less than desirable. The borders don't scroll
with the rest of the table, and overflow the bottom of the table, too.

So 1.5 seems to be better than 1.4 (though they have gone backwards since
1.3?), but it still leaves a lot to be desired.

Thanks for the example, Jukka. Will watch this one in future versions with
some interest. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top