[eluser]kevinprince[/eluser]
Here is my code for the view, ive tried the page break css a few ways this way it just makes a few blank sheets.
Help appreciated!
Code:
<html>
<style type="text/css">
body {
margin: 0.5in;
}
h1, h2, h3, h4, h5, h6, li, blockquote, p, th, td {
font-family: Helvetica, Arial, Verdana, sans-serif; /*Trebuchet MS,*/
}
h1, h2, h3, h4 {
color: #5E88B6;
font-weight: normal;
}
h4, h5, h6 {
color: #5E88B6;
}
h2 {
margin: 0 auto auto auto;
font-size: x-large;
}
li, blockquote, p, th, td {
font-size: 80%;
}
ul {
list-style: url(/img/bullet.gif) none;
}
table {
width:95%;
border-top:1px solid #e5eff8;
border-right:1px solid #e5eff8;
margin: 0 auto;
border-collapse:collapse;
font-size: 14px;
}
tr.odd td {
background:#f7fbff
}
tr.odd .column1 {
background:#f4f9fe;
}
.column1 {
background:#D8DFEA;
}
td {
color:#444;
border-bottom:1px solid #e5eff8;
border-left:1px solid #e5eff8;
padding: 2px;
text-align:left;
}
th {
font-weight:normal;
color: #3B5998;
text-align:left;
border-bottom: 1px solid #e5eff8;
border-left:1px solid #e5eff8;
padding: 2px 2px 2px 5px;
}
thead th {
background:#D8DFEA;
text-align:left;
font:bold 11px "Century Gothic","Trebuchet MS",Arial,Helvetica,sans-serif;
color:#3B5998;
}
tfoot th {
text-align:center;
background:#f4f9fe;
}
tfoot th strong {
font:bold 01px "Century Gothic","Trebuchet MS",Arial,Helvetica,sans-serif;
margin: 0;
color:#66a3d3;
}
tfoot th em {
color:#f03b58;
font-weight: bold;
font-size: 10px;
font-style: normal;
}
#footer {
border-top: 1px solid #CCC;
text-align: right;
}
P.breakhere {page-break-after: always}
</style>
<body>
<h3>Call List : <?=$title;?></h3>
<table width="100%" cellpadding="0" cellspacing="0" bordercolor="000" style="font:Arial, Helvetica, sans-serif">
<tr>
<td width="50%" bgcolor="#CCCCCC"><b>Name</b></td>
<td width="50%" bgcolor="#CCCCCC"><b>Number</b></td>
</tr>
<?php $i = 0; foreach($contacts as $item) { $i++?>
<tr>
<td>[<?php echo $i; ?>] - <?php echo $item['fname'];?> <?php echo $item['sname'];?></td>
<td><?php echo $item['phone'];?> <? echo $item['mobile'];?></td>
</tr>
<?php if ($i == "20") { echo "<p STYLE='page-break-after: always'></p>"; $i=0; }?>
<?php };?>
</table>
</body>
</html>