在每个HTML页面上打印表格标题

时间:2019-05-09 09:01:47

标签: c# html css asp.net

我正在尝试使用Asp.net中HTML的Thead标签在每个页面上打印页眉和页脚。 当我在thead标签中使用Div尝试徽标或图像时,它可以工作。但是,当我尝试使用表格时,在thead标记中则无效。

CSS:

我正在使用以下方法

@media print {
 thead { display: table-header-group; }
 tfoot { display: table-footer-group; }
}
@media screen {
 thead { display: block; }
 tfoot { display: block; }
}

    <table style="width:100%">
       <thead>
        <tr>
          <th>record1</th>
        </tr>
       </thead>
     <tbody>
     </tbody>
</table>
工作中 但是我需要使用

 <table style="width:100%">
           <thead>
            <tr>
              <th><table>
<tr><td>Name</td><td>Label</td></tr></table></th>
            </tr>
           </thead>
         <tbody>
         </tbody>
</table>

我需要知道每个页面上显示的信息和徽标,但是添加此信息后,他们留出了空白。请查看下面的屏幕截图   https://i.stack.imgur.com/L0ZTs.jpg

https://i.stack.imgur.com/Z1OsI.png

0 个答案:

没有答案
相关问题