Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friend
i am try to us Header and footer at each page at print media. in asp code.
but my content and header footer is overlapped with each other. so kindly help me ho can i arrange them please reply as soon as possible.
example

when i am try to increase content part, then it is overlapped with footer part.
C#
<html>
<head  runat="server">
    <title>page Break spacification </title>
    <link rel="shortcut icon" href="logo2.jpeg" type="image/jpeg" />
    <%--    logo and style sheet are here.--%>
    <style type="text/css">
        @page {
        margin-bottom:50px;
        margin-top:50px;
       
               
        }

         @media print {

            thead {
                
                display: table-header-group;
                top: 0px;
                color: red;
                font-size: 30px;
                position:static ;
                text-align:center;
            }

            tfoot {
                /*display:table-footer-group ;*/
                display:table-footer-group ;
                bottom: 0px;
                color: red;
                font-size: 15px;
                position:fixed;
                padding-bottom:0px;
                margin-bottom:0px;
            }

            h4 {
                page-break-after: always;
                color: pink;
                font-size:xx-large;
            }
            tr {
                display:table-row-group;
                bottom:100px;
            }
            
        }

        @media screen {
            thead {
                display: none;
            }

            tfoot {
                display: none;
            }

            h4 {
                display: none;
            }
        }
    </style>
</head>
<body>
    <form id="form1"  runat="server">
        <div>
            <table style="width:500px">
                <thead>
                    <tr>
                        <th>MASTER</th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <td>FOOTER 1</td>
                        <td> footer 2</td>
                    </tr>
                    <table><tbody><tr><td class="con">content 1</td><td>content 2</td></tr></tbody></table>
                </tfoot>
<tr><td>Content part.

when i am try to increase this part then it is overlapped with footer page.</td></tr>
</table>
</body>
</html>


????????????when i am try to increase this part then it is overlapped with footer page.?????????

code block added
Posted
Updated 10-Mar-14 2:06am
v3

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