Jukka K. Korpela wrote:
> I'm looking for a way have some content printed at the start of each 
> printed page. I guess this is would be generally useful, since many rules 
> and standards require that some identifying information appear on each 
> page.
>
> On Firefox 2, the following simple approach works nicely: wrap the 
> repeatable initial content in side <div id="hdr">...</hdr> and use e.g.
>
> @media print {
>    #hdr { position: fixed; top: 0; width: 100%; height: 3em; }
>    body { position: relative; top: 4em; } }
>
> It degrades gracefully on IE 6, but on IE 7, things get wild: the header 
> is repeated but it overlays the content proper. If I put the content 
> proper inside a div and set position: relative; top: 4em for it, then 
> IE 7 seems to do it right. Demo:
> http://www.cs.tut.fi/~jkorpela/test/hdr.html
> (I didn't actually print it; I'm relying on Print Preview.)
>
> Is the approach reasonable at all - can it be expected to work on 
> conforming browsers? Any pitfalls?
>
> Often we'd like to have the header not appear on the front page, but I'm 
> afraid there is no simple way to prevent that.
>
>
>   

Jukka,

I had a look at this in various browsers.

Results:

FF 2/Mac, FF 2/Win - Works ok, but the English - the universal language 
on the Internet heading with the copyright is repeated on every page.  
Your hdr division is at the very top of the page.

Safari - Works as expected.  The hdr division contents are repeated 
every page, but the English - the universal language... with the 
copyright title is only on the first page.

Opera/Mac - It appears that Opera's own styles interfere with yours.  
Your hdr title is displayed on the left ok, but Opera puts a page number 
where the url should be.  The url is printed at the bottom left of the 
page.  Also, the stuff at the top of the page is jammed right at the 
edge of the page - in print preview mode anyway.  When I actually print 
the page, your page title (with copyright) is printed vertically down 
the page!  But the content isn't jammed against the edges.  On page two, 
the first page title (with copyright) is printed under "The Current 
Situation" title.  The rest of the pages seem ok.

IE 6 - Works ok.  The first page title is only printed on the first 
page.  Your hdr contents are printed on every page.  I have found that 
fixed positioning seems to work in print sometimes.  I managed to break 
it, but that's too long a story to go into here.  Anyway, it seems to be 
working in your example.

It would appear that your approach is ok in most browsers.  You would 
have a bit more work to do if you wanted it to work in Opera - on the 
Mac anyway...

Lori
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to