Blank space appearing in print version

liunx

Guest
Hi,<br />
<br />
Can some PLEEEEEEEEASE help me. I'm experiencing some very odd behaviour in IE5.5 where it's producing a white space on my print version.<br />
<br />
Has anyone experienced a problem such as this before;<br />
<br />
I'm using the 'page-break-after' function of CSS to print one table per page. Where I have >1 table, I keep on getting a very large white-space before the very first table (essentially the first page's table is flush against the footer) and every page from there onwards prints correctly (i.e. table prints flush against the heading).<br />
<br />
However, where there is only one table to on a page to print, the white-space disappears and the page prints fine. AGGHHHHHHH!!!!!<br />
<br />
For some reason, where there is more than 1 page to print IE5.5 inserts this large space on the first page (before my first table) but then produces perfect 2nd, 3rd, 4th etc pages from there on.<br />
<br />
The code is very complex so I'm not sure if I can post it...essentially a combination of XSLT, Javascript and HTML.<br />
<br />
Thanks as always,<br />
Allan<!--content-->In my experience of Print Page scripts you need to use comments to state where you want to start and end printing like so...<br />
<br />
<br />
<!--START--><br />
code here<br />
<!--END--><!--content-->seems to me that your header is messed up. what is before that table if the table is at the footer?<!--content-->found the problem...what a nightmare.<br />
<br />
I was able to remove all the crap and discovered the xsl was generating this kind of code. Render this and hit the 'print preview' button and you'll notice the small table on the first page starts half way down. <br />
<br />
<br />
<html><br />
<head><br />
<title>Test</title><br />
</head><br />
<body><br />
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center"><br />
<br />
<tr bgcolor="green"><br />
<td align="center"><br />
<!-- TABLE 1 --><br />
<table cellspacing="0" cellpadding="0" border="1" width="500"><br />
<tr><br />
<td><br />
table 1 data<br />
</td><br />
</tr><br />
</table><br />
<!-- TABLE 1 ENDS --><br />
<br />
<br />
<!-- Insert a page break before table 2 begins--><br />
<p style="page-break-before:always;"/><br />
<br />
<!-- TABLE 2 --><br />
<table cellspacing="0" cellpadding="0" border="1" width="500"><br />
<tr><br />
<td><br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
<tr><br />
<td><br />
<br />
table 2 data<br />
</td><br />
</tr><br />
</table><br />
<br />
<!-- TABLE 2 ENDS --><br />
</td><br />
</tr><br />
<br />
</table><br />
<br />
<br />
</BODY><br />
</HTML><!--content-->doesn't on me in mozilla, but it does in IE6. the reason is IE6 is a real big loser on css2. it creates that big margin because of the page-break-before attribute.<br />
<br />
and you can't have a /> in a P tag. the reason is the P tag has a closing tag. you only do a /> on tags that don't have a closing tag.<!--content-->
 
Back
Top