Tables in HTML can have footers:
<TABLE> <THEAD><TR><TD>Your header goes here</TD></TR></THEAD> <TFOOT><TR><TD>Your footer goes here</TD></TR></TFOOT> <TBODY> <TR><TD> Page body in here -- as long as it needs to be </TD></TR> </TBODY> </TABLE>
Typically, legacy Internet Explorer displays only TFOOT at the bottom of the entire table. But there is a style that can be applied to TFOOT (and THEAD ) to print at the bottom of each page stretched over a table. From MSDN :
table-footer-group
The object is displayed as tFoot . Header always displayed
after all other lines and groups of lines, as well as before any lower labels.
The footer is displayed on each page stretched on the table.
Adding table-footer-group as a style to TFOOT makes it (in Internet Explorer) print at the bottom of every page stretched into a table:
<STYLE type="text/css"> tfoot { display: table-footer-group; } </STYLE>
But if IE9 (release candidate) is placed in standard mode:
<!DOCTYPE html>
then TFOOT no longer displayed at the bottom of each page covering the table, but only at the end of the entire table.
I checked the HTML specification to find out what the correct behavior is, and undefined !:
table-footer-group (in HTML: TFOOT)
Like "table-row-group", but for visual formatting, a group of rows is always displayed after all other rows and rows of groups and before any lower labels. Printing user agents can repeat the footer of the lines on each page stretched over a table. If the table contains several elements with "display: table-footer-group", only the first is displayed as a footnote; others are treated as if they had "display: table-row-group".
Note: Accent is added for effect.
Is there a way in IE9 for me to choose to print TFOOT at the bottom of every page stretched over a table?
Update one
It is interesting to note that table-footer-group is a typical default value for TFOOT elements, but in previous versions of IE you could choose what behavior you wanted:
- bottom of the whole table
- at the bottom of the whole table and each intermediate page
choosing a style.
Update two
As of now, I force Internet Explorer to remain in the IE8 standard with:
<!DOCTYPE html> <HTML> <HEAD> <META http-equiv="X-UA-Compatible" content="IE=8" />
see also
html standards html-table internet-explorer-9
Ian boyd
source share