print css with table header and footer

http://csscreator.com/node/35077

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

<html xmlns="http://www.w3.org/1999/xhtml" >
	<head>
		<title>Print the footer</title>
		<link rel='stylesheet' href='printfootscreen.css' type='text/css' media='screen'>
		<!--This will be only used when the page will be printed-->
		<link rel='stylesheet' href='printfootprint.css' type='text/css'  media='print'>
	</head>
	<body>
		<div id='container'>
			<!--the table below close after the closing tag of the tbody-->
			<table border='0' width='100%'>
				<!--The header will be repeated on every page-->
				<thead>
					<tr>
						<th style='width:100%'>
							This header is being repeated in all the printed pages
						</th>
					</tr>
					<tr>
						<th>
							<!--The line below the header-->
							<hr />
						</th>
					</tr>
				</thead>
				<!--Footer-->
				<tfoot>
					<tr>
						<td width='100%'>
							<table width='100%' border='0'>
								<tr>
									<td colspan='4'>
										<br />&nbsp;
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<tr>
						<td width="100%">
						<!--------------------The page code will be placed here------------->
							<table border='0' width='80%'>
								<tr>
									<td>
										Test print page here <br />
										Test print page here <br />
										Test print page here <br />
										Test print page here <br />
									</td>
								</tr>
							</table>
						<!------------------------------------------------------------------------->
						</td>
					</tr>
				</tbody>
			</table>
			<!--the table contains the footer which will be displayed only on print media-->
			<table id="footerforprinter" width="100%">
				<tr>
					<td width="100%">
						Op al onze fakturen en offertes zijn van toepassing de 'Algemene voorwaarden Alexion Software' zoals gedeponeerd onder nummer 02061218 bij de KvK te Groningen
					</td>
				</tr>
			</table> 
		</div>
		<!--the div contains the footer which will be displayed only on print media-->
		<div id='footer' >
			Op al onze fakturen en offertes zijn van toepassing de 'Algemene voorwaarden Alexion Software' zoals gedeponeerd onder nummer 02061218 bij de KvK te Groningen
		</div>
	</body>

the print css:

* {
	padding: 0;
	margin: 0;
}

#footerforprinter {
	margin-top: 16em;
	display: block; 
	position: fixed; 
	bottom: 0;
}

#container {
	min-height: 100%;
	width: 100%;
	margin: 0 auto;
}

* html #container {
	height: 100%;
}

#footer {
	display: none;
}

#clearfooter {
height: 50px;
}

and the screen css</html>