I must create a dynamic page through php, and the result must be an A4 printable page. Up here no problem, I have the page, and with Google Chrome I can view and print in A4 perfectly.
but
if I change the web browser, the A4 1 page is splitted into 2 pages (the last 2 or 3 lines on the 2nd page)
How may I adapt the print following the used browser? (maybe using css, or java, or php?)
thank everybody for your help
in my css I have this:
.page {
width: 210mm;
min-height: 297mm;
padding: 2mm;
margin: 5mm auto;
border: 1px #ffffff solid;
border-radius: 5px;
background: white;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
@page {
size: A4;
margin: 0;
}
@media print {
html, body {
width: 210mm;
height: 297mm;
}
.page {
margin: 0;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: always;
}
}