[Techtalk] (HTML) Repeating TH elements

dominik.schramm at gmxpro.net dominik.schramm at gmxpro.net
Sun Jan 11 18:27:15 EST 2004


Hi,

I've also looked for the answer, but found nothing.
I don't know the answer, I'm just speculating below, but
you may be lucky to get an answer in a forum/newsgroup...
specialized in HTML.

Ricky Buchanan <rb at tertius.net.au> writes:
> I have a longish table with about 10 fairly narrow column which, when
> printed, takes up several pages.  I want the <TH> elements showing the
> table headings to repeat at the top of every page so you don't have to
> keep checking what column you are up to by counting from the left.  
>
> Does anybody know how to do this in CSS (preferably) or in regular HTML
> without explicitly copy/paste'ing the TH row into the right place?  I
> want it to stay at the top of the page even if *where* the top of the
> page falls changes, so I don't want to copy/paste it.

A major problem why this is difficult (and also a reason why this
may not be possible at all) could be that there is no "page" concept
in HTML. What is an "HTML page"? You can use the scrollbar of your 
browser to make the visible page begin whereever you like, so where 
do want the repeated table headers to show?
In LaTeX this is easy, because there are actually real pages, DVI
files ("compiled LaTeX") are displayed with a page-oriented viewer
or printed.

So, IMHO there can't be a solution in HTML/CSS -- please, someone
correct me if I'm wrong --, this sounds like an ideal application
for JavaScript or some other client-side (scripting) language.

> I think it's a fairly advanced question ... at least the answer doesn't
> seem simple :(

It contradicts my understanding of what HTML is supposed to 
provide. So I think it'll be at least "tricky".

hope this helps somehow
regards,
dominik

-- 
Dominik Schramm <dominik.schramm at gmxpro.net>
pgp key available via e-mail, web, and FTP from 
http://www.cam.ac.uk.pgp.net/pgpnet/wwwkeys.html



More information about the Techtalk mailing list