Scrolling table options?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asearle
    New Member
    • Sep 2006
    • 39

    Scrolling table options?

    Hi everyone,

    I have some simple but very long reports that I would like to present in tabular format. To make this more comfortable for the reader I would like the headers to remain static at the top of the tables and just the content to scroll.

    I got this working with 'DIV' commands but found that, as various users re-sized their browsers, the column headers would go out of line. I tried fixing this with column width declarations but this wouldn't work in all cases (i.e. where text is too long for the column, it all gets distorted).

    Next I found the mark-up tags <thead> and <tbody> which looked perfect for my needs ...

    http://www.w3.org/TR/html4/struct/tables.html#ede f-TBODY

    ... but here I found that, in order to get this to work with IE (where the presentation wasn't as good as Firefox), I needed to add the declaration ...

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    ... at the top of the HTML.

    Then, when I tried to incorporate my scrolling table into my XSL code, I found that both the header (<!DOCTYP HTML ... ) was not accepted by the IE interpreter and my '<xsl:when ...' clauses conflicted with my (new) <thead> and <tbody> syntax.

    This is all turning into a rather big headache for me and I am hoping that someone out there can recommend the best method for implementing scrollable tables (with fixed headers) in XSL under IE.

    This must be an issue that has come up before and, although I have googled on the key words (a lot), I find no clear recommendations and loath to resort to the various plug-ins and coded fixes that seem to be on offer. Best for me would be the thead/tbody solution but I must be able to implement this in XSLT under IE.

    Many, many thanks for any tips that you can give me.

    Cheers,
    Alan.
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    XSLT uses a special method to output doctype, so that the processor can tell whether it's the doctype for the xslt, or the doctype for the result document:

    Use a <xsl:output> element just under they stylesheet node.
    http://www.w3schools.c om/xsl/el_output.asp

    <xsl:output doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>

    Comment

    Working...