Forum How do I...?

Setting colum width of table which was moved to the header

DesertF0x
I have moved a table to the page header using:
#header {
    flow: static(header);
}

@page {
     @top{
         font-size: 10pt;
         vertical-align: bottom;
         content: flow(header);
        }
}


But I am not able to set the colum widths. I have tried with and without table-layout: fixed; and with html or css widths in px or %. Nothing works.

<table border="1" cellpadding="0" cellspacing="0" id="header" style="table-layout: fixed; width: 100%;">
	<tbody>
		<tr>
			<td align="left" style="width: 100px;">&nbsp;Logo</td>
			<td align="center">Title&nbsp;</td>
			<td align="right" style="width: 200px;">right&nbsp;</td>
		</tr>
	</tbody>
</table>

I am using prince 13.5-1.
Any hints?
pjrm
Hmm, the css & html that you've posted here works fine for me: left column looks half the width of the right column (and shrinks to a quarter if I change 100px to 50px), and Title takes up the rest of the space.

I attach the full html file I've used, and the pdf that I get from it and prince-13.5. Can you try this exact file and say what it is about the output that isn't what you wanted?

  1. page-header-table.html0.8 kB
    Full HTML file
  2. page-header-table.pdf178.2 kB
    prince 13.5 pdf
DesertF0x
I finally made it work putting all the styles in the css like this:
#header {
    table-layout: fixed ;
    width: 100%;
    flow: static(header);
}
#header tr td:nth-child(1) {
       width: 25%;
}

#header tr td:nth-child(2) {
       width: 25%;
}

#header tr td:nth-child(3) {
       width: 50%;
}


Thanks.