Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > repeat header element when printing

Reply
Thread Tools

repeat header element when printing

 
 
GF
Guest
Posts: n/a
 
      01-24-2013
Hi,

I want a <div> and it's content to overlay each page that I print. So far, I
get a few texts repeated and the correct overlay only on the last page.

I need some code that works on IE8. If it worked on Webkit, even better, but
IE8 is a must.


The complete code is here:
http://www.glbasic.com/beta/wdkem.html

Some image about what I need:
http://www.glbasic.com/pix/print_preview_overlay.png


Here's my code (important parts)

#CSS
..ztvk thead {display: table-header-group;}
..headspace{width:80%; height: 2.7cm; border: 3px solid red;}
..overlay {position: fixed; left:0px; top:0px; width:17.0cm; height:22.0cm;
border: 5px solid blue; overflow:visible; z-index:100;}

#HTML
<...>
<table>
<thead class='ztvk'>
<tr><td class='headspace'>

<!-- this is the overlay container -->
<div class='overlay'>

<!-- a box -->
<div style='position:absolute; left:0.00cm; top:0.00cm; width:17.00cm;
height:22.00cm; z-index:102'>&nbsp;</div>

<!-- some text -->
<div style='position:absolute; left:0.5cm; top:0.25cm; height:0.50cm;
padding:0.01cm; margin:0.01cm; line-height:0.50cm;
z-index:101;'><b>TEXT</b></div>
</div>
</td></tr></thead>

<tbody><tr><td class='maintext'>
text goes here...

 
Reply With Quote
 
 
 
 
123Jim
Guest
Posts: n/a
 
      01-24-2013
On 24/01/2013 09:41, GF wrote:
> Hi,
>
> I want a <div> and it's content to overlay each page that I print. So
> far, I get a few texts repeated and the correct overlay only on the last
> page.
>
> I need some code that works on IE8. If it worked on Webkit, even better,
> but IE8 is a must.
>
>
> The complete code is here:
> http://www.glbasic.com/beta/wdkem.html
>
> Some image about what I need:
> http://www.glbasic.com/pix/print_preview_overlay.png
>
>
> Here's my code (important parts)
>
> #CSS
> .ztvk thead {display: table-header-group;}
> .headspace{width:80%; height: 2.7cm; border: 3px solid red;}
> .overlay {position: fixed; left:0px; top:0px; width:17.0cm;
> height:22.0cm; border: 5px solid blue; overflow:visible; z-index:100;}
>
> #HTML
> <...>
> <table>
> <thead class='ztvk'>
> <tr><td class='headspace'>
>
> <!-- this is the overlay container -->
> <div class='overlay'>
>
> <!-- a box -->
> <div style='position:absolute; left:0.00cm; top:0.00cm; width:17.00cm;
> height:22.00cm; z-index:102'>&nbsp;</div>
>
> <!-- some text -->
> <div style='position:absolute; left:0.5cm; top:0.25cm; height:0.50cm;
> padding:0.01cm; margin:0.01cm; line-height:0.50cm;
> z-index:101;'><b>TEXT</b></div>
> </div>
> </td></tr></thead>
>
> <tbody><tr><td class='maintext'>
> text goes here...
>


In firefox I see a header at the top of each page when I check print
preview, but checking print preview seems to choke IE9 for your page.
Not sure what you are trying to achieve really
but maybe this will help: http://www.alistapart.com/articles/goingtoprint/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
Repeat header of gridview on every printout page satnamsarai@gmail.com ASP .Net 0 02-28-2008 04:42 PM
PERL + Repeat header on every page while printing excel venkatasatyasuresh@gmail.com Perl Misc 3 12-30-2007 04:41 PM
How to repeat header of HTML/Gridview across pages =?Utf-8?B?R2lyaXNo?= ASP .Net 2 11-17-2007 04:09 AM
Is it possible to repeat the DataGrid header on the top of each Printed page Raja ASP .Net Datagrid Control 0 07-22-2003 06:32 PM



Advertisments