Printer header on every page using page breaks

I am trying to print all of my tables on seperate pages. I have successfully done so, but t he issue I am running into is that I have a <thead> table and I need that to print at the top of everypage. I also want to combine the first table with the thead so the <thead> and 1st table print on the first page and then the rest of the tables print on seperate pages..The CSS I am using is below..
<style>
table.repeat {
	border-spacing: 2px;
	border: 2pt solid black;
	border-collapse: collapse;
	table-layout:fixed;
	width=780px;
	cellpadding=0;
	cellspacing=0;
	page-break-before: always;
	page-break-inside: avoid;
}

</style>

Open in new window

brad0525Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mreuringCommented:
Hi Brad,

First of all, if you need a thead for every table then add it to every table in your html. If there's certain tables you don't want to display the thead for on screen add a stylesheet for @media(screen) and specifically hide the thead from the screen. Or alternatively hide the thead, but add a stylesheet for @media(print) and unhide it :)

As for printing the tables each on their own separate page, this'll be hard, if not impossible since most browsers don't honor the specific page-related style-rules.

You may have some degree of success by putting the tables in a wrapper div and setting the div to height 100% and overflow visible for @media(print) only, no guarantees, but it's the only trick I can think of that may have some degree of success....

Cheers,

 Martin
0
Michel PlungjanIT ExpertCommented:
Or convert to PDF
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.