html - Table caption element is causing page to break when printing -


consider following table:

<table> <caption>the caption</caption> <thead>...</thead> <tbody>...</tbody> <tfoot>...</tfoot> </table> 

the table renders right when displaying on screen, when printing breaks table new page. when delete caption element or display:none, table renders right on printing.

any help?

according w3c:

the table elements, table, tr, td, th, , caption, should have standard meaning , display treatments: table, table-row, table-cell, , table-caption.

from understanding means

caption { display: table-caption; } 

edit: found more accurate style:

table         { display: table } tr            { display: table-row } thead         { display: table-header-group } tbody         { display: table-row-group } tfoot         { display: table-footer-group } col           { display: table-column } colgroup      { display: table-column-group } td, th        { display: table-cell } caption       { display: table-caption } 

please tell me if works you.

for more detailed information topic, visit this page


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -