Reputation: 65
I need to print some database content in multiple pages.
When i have a large text, and it's occupies two pages, the text on second page should start after 3cm from the top and not at the edge of the page.
Any sugestion?
@media print {
@page {
margin: 0;
}
body {
margin: 2cm 3cm 2cm 3cm ;
font: 12pt Arial;
}
}
Upvotes: 0
Views: 82
Reputation: 67748
You should set the margins in the @page
rule, not in the rule for body
, like
@media print {
@page {
margin-top: 20mm;
margin-bottom: 20mm;
margin-left: 30mm;
margin-right: 30mm;
}
...
Upvotes: 1