Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi friends,

I have printed functionality. My task i have to show header and footer in every page . i tried to solve this but i couldn't able to done this. bit i got result from one end . header has displayed perfectly in every page but footer was not showed in every page it showed only on end of the print page

What I have tried:

<pre><table>
        <thead>
            <tr>
                <td>
                    <img src="../../../../../Content/images/logoheader.png" style="width:100%;height:70px;" />
                </td>
            </tr>
        </thead>
        
        <tbody>
            <tr>
                <td>
                    <img src="' + data + '" />
                </td>
            </tr>
        </tbody>        
        <tfoot>
            <tr>
                <td>
                    <img src="../../../../../Content/images/logoFooter.png" style="width:100%;" />
                </td>
            </tr>
        </tfoot>
    </table>

then ,

thead { display:table-header-group;}tfoot { display:table-footer-group;}


i've used this code. but i didn't get my results. if anyone knows how to display footer in every page while printed the page .please tell me thanks for advance
Posted
Comments
Richard Deeming 6-Jul-17 10:08am    
Do you have multiple rows in the table, or just one massive image? I don't think the table-x-group rules work if the browser has to split a single cell across multiple pages.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900