Forum How do I...?

Add a table to the page header

skoleva
Hello,

Is there a way to put a table to the page header? Where should be defined the mentioned table?
And also I want the table to be on all pages, not only one.
The PDF will be created using C#.

This is the example table:
<table id="header">
   <tr>
       <th rowspan="3">Table</th>
       <th>Column 1</th>
       <th>Column 2</th>
       <th colspan="2">Column 3 and 4</th>
       <th rowspan="2">Column 5</th>
   </tr>
   <tr>
       <td rowspan="2">Text 1</td>
       <td rowspan="2">Text 2</td>
       <th>Text 3</th>
       <th>Text 4</th>
   </tr>
</table>

<style>
table
{
    border-collapse: collapse;
    font-size: x-small;
    text-align: center;
}
td, th
{
    border: 1px solid black;
}
</style>


And this is the style that I tried:
@page 
{ 
    font-size: 8pt; 
    @top 
    { 
        content: flow(header); 
    } 
    @bottom 
    { 
        content: \"Page \" counter(page) \" of \" counter(pages); 
    }
}

#header 
{ 
    static(header); 
}
mikeday
It should be:
#header {
    flow: static(header)
}
skoleva
Thank you, it works perfect :)

The same style should be if I want to put a different footer than "content: \"Page \" counter(page) \" of \" counter(pages); ", right?

Edited by skoleva