日期:2014-05-17  浏览次数:20839 次

ASP打印格式问题
大家好,我现在有个问题:
我做了一个打印程序,这个程序的调试是基于IE6的.但现在客户那边统一换了IE7,或IE8,结果打印格式有所变化,有何方法可以解决这个问题.代码如下:请高手指点.

<html xmlns="http://www.w3.org/1999/xhtml">
<style type="text/css">
body
{
MARGIN: 0px;
background-color:#FFFFFF;
}
.mainDiv
{
height:160mm;
width:134mm;
position:absolute;
top:19mm;
left:6mm;
}
.nameDiv
{
width:32mm;
height:5mm;
position:absolute;
top:33mm;
left:15mm;
font-size:16px;
text-align:center;
}
.sexDivMan
{
width:3mm;
height:3mm;
position:absolute;
top:33mm;
left:61mm;
font-size:12px;
text-align:center;
}
.sexDivWomen
{
width:3mm;
height:3mm;
position:absolute;
top:33mm;
left:73mm;
font-size:12px;
text-align:center;
}
.ageDiv
{
width:18mm;
height:5mm;
position:absolute;
top:33mm;
left:100mm;
font-size:16px;
text-align:center;
}
.telDiv
{
width:58mm;
height:5mm;
position:absolute;
top:41mm;
left:22mm;
font-size:16px;
text-align:center;
}
.feeTypeDiv1
{
width:3mm;
height:3mm;
position:absolute;
top:48mm;
left:17mm;
font-size:12px;
text-align:center;
}
.feeTypeDiv2
{
width:3mm;
height:3mm;
position:absolute;
top:48mm;
left:32mm;
font-size:12px;
text-align:center;
}
.protectNumberDiv
{
width:48mm;
height:5mm;
position:absolute;
top:48mm;
left:78mm;
font-size:16px;
text-align:center;
}
.diagnosesDiv
{
width:35mm;
height:5mm;
position:absolute;
top:56mm;
left:36mm;
font-size:16px;
text-align:center;
}
.bedDiv
{
width:18mm;
height:5mm;
position:absolute;
top:56mm;
left:103mm;
font-size:16px;
text-align:center;
}
.adviceDiv
{
position:absolute;
top:63mm;
left:22mm;
width:99mm;
height:5mm;
font-size:16px;
text-align:center;
}
.resultDiv
{
position:absolute;
top:70mm;
left:22mm;
width:47mm;
height:5mm;
font-size:16px;
text-align:center;
}
.yearDiv
{
position:absolute;
top:70mm;
left:87mm;
width:12mm;
font-size:12px;
text-align:center;
}
.monthDiv
{
position:absolute;
top:70mm;
left:102mm;
width:6mm;
font-size:12px;
text-align:center;
}
.dayDiv
{
position:absolute;
top:70mm;
left:111mm;
width:6mm;
font-size:12px;
text-align:center;
}
.mainContent
{
width:100%;
position:absolute;
top:90mm;
left:0mm;
}
.priceDiv
{
position:absolute;
top:180mm;
left:99mm;
width:20mm;
font-size:16px;
text-align:left;
float:left;
}
.STYLE2
{
font-size:16px;
}
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>处方打印</title>
</head>

<body>
<div id="nameDiv" class="nameDiv">张三四</div>
<div id="sexDivMan" class="sexDivMan">√</div>
<div id="sexDivWomen" class="sexDivWomen">√</div>
<div id="ageDiv" class="ageDiv">29</div>
<div id="telDiv" class="telDiv">021-12345678</div>
<div id="feeTypeDiv1" class="feeTypeDiv1">√</div>
<