I am generating a php report from Mysql DB. Everything I display in this report is fetched from database.
The problem I face in print preview
- If table 3 expands, table4 breaks into two half and sits on next page
2.If I use
table-header-group;
as Headers for table5, table1 & table 3, its not working in browsers.
Solution I needed
1.If table3 row increases, if table 4 touches the below line(div border),it should completely move to next page in print preview.
2.If table4 goes to next page, it should come below table1 & 2.
Need Help!
My Code:
@media print {
#container
{
border:1px solid;
}
table
{
border-left: 1px solid #ccc;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
border-spacing:0;
border-collapse: collapse;
}
table td
{
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 1mm;
}
table.heading
{
height:50mm;
}
#table_table3, #table_table4
{
font-size: 9pt;
line-height: 7px;font-size: 9pt;
page-break-before: always;
}
#table_table3 table , #table_table4 table
{
width:100%;
border-left: 1px solid #ccc;
border-top: 1px solid #ccc;
font-size: 9pt
border-spacing: 0;
border-collapse: collapse;
page-break-before: always;
//margin-top:5mm;
}
#table_table3 table td , #table_table4 table td
{
text-align:center;
font-size:9pt;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding:1mm 0;
page-break-before: always;
}
}