HTML: IE9 standards mode prints TFOOT on every page

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" /> <!--IE8 Standards mode, so that we get the THEAD at the top, and the TFOOT at the bottom, of every page--> 

see also

+8
html standards html-table internet-explorer-9
source share
1 answer

In HTML, the behavior was undefined. Browsers could:

  • display the entire table
  • at the bottom of each page.

The behavior I experienced was in the Microsoft Internet Explorer 9 Release.

In the final version of Internet Explorer 9 (version 9.0.8112.1642 RTM), TFOOT is TFOOT displayed at the bottom of each printed page.

In earlier versions of IE, you can choose between:

  • TFOOT appears at the bottom of each page.
  • TFOOT appears after the table

manually specifying TFOOT css style:

 tfoot { display: table-footer-group; } 

Despite the fact that TFOOT already has a table-footer-group display style, specifically , it will also show IE that you want TFOOT to be printed at the bottom of each page. (not after the table).

Not specifying it (default behavior) will make IE print TFOOT after the whole table.

If you use IE9 and want to have only TFOOT after printing the entire table, you will have to put Internet Explorer in IE8 standards mode:

 <!DOCTYPE html> <HTML> <HEAD> <META http-equiv="X-UA-Compatible" content="IE=8" /> <!--IE8 Standards mode, so that we get the TFOOT after the entire table has printed, not at the bottom of each printed page--> ... 
+2
source share

All Articles