请帮忙修改个打印格式吧 老是对不齐 搞了一天了
线的上部和线作为页眉页脚的功能 要在打印的每页上都有 谢谢
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>入院记录</title>
<style>
@media print{
INPUT {display:none}
}
</style>
</head>
<body>
<TABLE border="0" style="font-size:10pt;" width="100%" align="center">
<THEAD style="display:table-header-group;font-weight:bold">
<TR><TD colspan="2" align="center" style="font-weight:bold;border-bottom:2px solid blue">
<TABLE>
<TR>
<TD width="16.6%">姓名:张三<!Insert_StudyLocalID></TD>
<TD width="16.6%">性别:男<!Insert_StudyLocalID></TD>
<TD width="16.6%">年龄:25岁<!Insert_StudyLocalID></TD>
   <TD width="16.6%">科室:内科<!Insert_StudyLocalID></TD>   
   <TD width="16.6%">床号:NK27<!Insert_StudyLocalID></TD>
   <TD width="17.0%">住院号:123456<!Insert_StudyLocalID></TD>
</TR>
</TABLE>
</TD>
</TR>
</THEAD>
<TBODY style="text-align:center">
<TR><TD Height=1 ALIGN=center VALIGN=TOP><font size=+3>
   入   院   记   录
</Font></TD></TR>
<TR >    
<TD width="50%">姓    名:<!Insert_DepName></TD>
   <TD width="50%">籍    贯:<!Insert_BedNo></TD>
</TR>
<TR >
<TD>性    别:<!Insert_DepName></TD>
<TD>民    族:<!Insert_BedNo></TD>
</TR>
<TR >
<TD>年    龄:<!Insert_DepName></TD>
<TD>入院日期:<!Insert_BedNo></TD>
</TR>
<TR>
<TD>婚姻状况:<!Insert_DepName></TD>
<TD>记录日期:<!Insert_BedNo></TD>
</TR>
<TR>
<TD>职    业:<!Insert_DepName></TD>
<TD>病史陈述者:<!Insert_BedNo></TD>
</TR>  
<TR>
<TD Height=1 ALIGN=LEFT VALIGN=TOP><B>    主   诉:</B><!Insert_Report></TD>
</TR>
<TR>
<TD Height=1 ALIGN=LEFT VALIGN=TOP><B>    现病史:</B>临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替临时用个文本代替</TD>    
</TR>
<TR>
<TD Height=1 ALIGN=LEFT VALIGN=TOP><B>    既往史:</B><!Insert_Conclusion></TD>
</TR>
<TR>
<TD Height=1 ALIGN=LEFT VALIGN=TOP><B>    个人史:</B><!Insert_Conclusion></TD>
</TR>
<TR>
<TD Height=1 ALIGN=LEFT VALIGN=TOP><B>    婚育史:</B><!Insert_Conclusion></TD>
</TR>
<TR>
<TD Height=1 ALIGN=LEFT VALIGN=TOP><B>    家庭及其遗传病史:</B>