[thelist] <thead> vs. <th>?

MRC webmaster at equilon-mrc.com
Tue Apr 9 14:05:06 CDT 2002


Jay,

> I read through the recommendation at
> http://www.w3.org/TR/html4/struct/tables.html and searched Google
>
http://www.google.com/search?hl=en&q=scrolling+table+cells&btnG=Google+Searc
> h and I cannot find a method using HTML alone that would allow table cells
> to scroll under <thead>. I have some extensive report tables that would
> benefit greatly from this and the <thead> 's are already in place. Can
> someone point me specifically to something that shows me how to perform
the
> scrolling maneuver?

"Table rows may be grouped into a table head, table foot, and one or more
table body sections, using the THEAD, TFOOT and TBODY elements,
respectively. This division enables user agents to support scrolling of
table bodies independently of the table head and foot...." [1]

    Note that the wording is squishy, leaving it up to the browser makers
whether or not to provide the scrolling functionality. Last I had checked,
Mozilla/Netscape 6 does support this functionality, whereas no version of
IE/Win32 currently does.
    You _can_ mimic this behavior in IE with a fairly complex mix of tables
within divs, scripting, and style sheets. But in my experience, there are
some drawbacks (such as, the layout falls apart when the page is printed,
requiring additional print-only styles and table futzing to make things
pretty on the printed page).
    Since I develop primarily for an IE-only Intranet, I have been able to
use this approach, but I haven't yet made a whole-hearted effort to spread
the joy to other browsers and platforms (and my guess is that it won't be
easy, if it's even possible). At some point, though, I may write an article
describing the process and the drawbacks.

1. http://www.w3.org/TR/html4/struct/tables.html#h-11.2.3

James Aylard




More information about the thelist mailing list