有以下表格代码,但表格高度在不同浏览器和打印时不一样。请参阅第 1,2 列和第 3 列的图片差异。我需要每张桌子的高度相同,有或没有线条。
谢谢
马汀
CSS:
.prn_outer {
margin: 0;
padding: 0;
border: 1px solid #333;
}
.prn_inner {
margin: 0;
padding: 0;
height: 160px;
border: 1px solid #333;
}
.prn_row_top {
margin: 0;
padding: 0;
border: 1px solid #333;
}
.prn_row_bottom {
margin: 0;
padding: 0;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #333;
}
html:
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="prn_outer">
<tr>
<td> </td>
</tr>
<tr>
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="20%"><table border="0" height="160" cellpadding="0" cellspacing="0" width="100%" class="prn_inner">
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="18" class="prn_row_bottom"> </td>
</tr>
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="18" class="prn_row_bottom"> </td>
</tr>
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="18" class="prn_row_bottom"> </td>
</tr>
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="18"> </td>
</tr>
</table></td>
<td width="20%"><table border="0" height="160" cellpadding="0" cellspacing="0" width="100%" class="prn_inner">
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="18" class="prn_row_bottom"> </td>
</tr>
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="18" class="prn_row_bottom" > </td>
</tr>
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="18" class="prn_row_bottom"> </td>
</tr>
<tr>
<td height="18"> </td>
</tr>
<tr>
<td height="18"> </td>
</tr>
</table></td>
<td width="20%"><table border="0" height="160" cellpadding="0" cellspacing="0" width="100%" class="prn_inner">
<tr>
<td height="18" class="prn_row_bottom"> </td>
</tr>
<tr>
<td height="134"> </td>
</tr>
</table></td>
<td width="20%"><table width="100%" height="160" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="158"> </td>
</tr>
</table></td>
<td width="20%"><table width="100%" height="160" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="158"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>