Printing a table

Hi all,

Using javascript i print a table (window.print()). This table is too big to show it on 1 page, so it automatically prints mulitple pages. This is good, but the first 2 rows are on the first page, and all the other rows on the other pages. This only happens in IE (in firefox it works well).
The table is created and filled dynamically.

Screenshot of the *.xps file

i hope you can help me,

Can you give us a link to the page itself? The screenshot doesn’t show us what’s actually happening behind the scenes.

thanks for your reply
it’s an offline page for the local network only.
but here are some pieces of php where the table gets filled:
(i’m going to optimize the code later, so don’t be too critical :p)

if($weeknr2 == $weeknr){
					echo "<td" . $bgcolor . "><br />" . $day . "</td>";
					echo "<td" . $bgcolor . "><font color='red'>".$weeknr."</font><br />" . $day . "</td>";
echo "<td $setkleur>" . $dag[2] . "/<br />" . $dag[1] . "</td>";
echo "<tr><td bgcolor='" . $kleur . "' $style id='namen'><div id='w180'>" . $row[1] . "</div></td><td $style><div id='w110'>" . $row[3] . "</div></td>";
							echo "<td $style><div style='background-color:".$kleur1.";' id='div1'><h6 id='h61'>" . $vrij . $content1 . $vrij2 . "</h6></div><div style='background-color:".$kleur2.";' id='div1'>" . $vrij . $content . $vrij2 . "</div></td>";
							echo "<td $style><h6 style='background-color:".$kleur1.";' id='content2'>" . $vrij . $content1 . $vrij2 . "</h6><div style='background-color:".$kleur2.";' id='div1'>". $vrij . $content . $vrij2 . "</div></td>";

it’s pretty hard to find the exact lines of code, but this should be something like it. (mostly because the function is over 300 lines)…

Sorry, but raw PHP isn’t a lot of use to me … can you post the HTML source code that comes out as a result?

It won’t let me post the entire code here, so i uploaded it to some free hosting website :wink:

i just noticed Firefox prints it out correctly without the spacing, but IE still has the issue.
Also, when i print regular, so not landscape, (don’t know what it’s called in English), it shows up ok. still not perfect but the white spacing is gone.

Off Topic:

The two main types of printing orientation are; Portrait (longer height than width ratio) and Landscape (longer width ratio than height).