0
私はいくつかのphp/posgresql結果をヘッダーとフッターのある文書に出力する必要があります。 私の印刷ページはPHPです。 ここまでは問題なく動作しますが、コンテンツがフッターに表示されるという問題があります。 この問題を解決するにはどうすればよいですか?ヘッダーフッターの内容を含むhtmlページを印刷
マイコード:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PRINT PAGE</title>
<style>
html, body { height:100%; }
@page { margin: 5px; }
header { top:0; left:0; width:100%; height:15%; position:fixed; }
footer { bottom:0; left:0; width:100%; height:5%; position:fixed; }
</style>
</head>
<body>
<header>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center" valign="middle" style="border-bottom:#036 solid 1px; padding-bottom:5px; padding-top:5px;">LOGO</td>
</tr>
<tr>
<td width="30%" align="center" valign="middle" style="border-bottom: #036 solid 1px; padding:5px;">HEADER</td>
</tr>
</table>
</header>
<div style="position:relative; top:16%; bottom:6%; width:100%;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="font-family:Tahoma, Geneva, sans-serif; font-size:14px; text-align:justify"><?php echo $row_print['COL'];?></td>
</tr>
</tbody>
</table>
</div>
<footer>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle" style="font-family:Tahoma, Geneva, sans-serif; font-size:12px; text-align:center; border-top:#036 solid 2px;">FOOTER</td>
</tr>
</table>
</footer>
</body>
</html>
同じそれでも、動作していません... –