0

I am trying to set the size of a div to A4 so that every new box start from a new page. But my box is overlapping over the previous page.

I used this code from this post:

.invoice-box {
    width: 21cm;
    min-height: 29.7cm;
    padding: 1cm;
    margin: 1cm auto;
    border: 1px #eee solid;
    background: white;
    font-size:16px;
    line-height:24px;
    color:#555;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

but the pages are overlapping.

enter image description here

How to correct it?

Community
  • 1
  • 1
Manish Gupta
  • 4,438
  • 18
  • 57
  • 104

1 Answers1

1

Not an exact fix, but you can set a page break for printing with page-break-after definition.

Sami Kuhmonen
  • 30,146
  • 9
  • 61
  • 74