0

I have an html page with 2 printable pages. I created a media print style border for each page but my code adds a border for the first page only.

What do I need to add to show the border on every page?

Please find my print media CSS below and take a look at my screenshot;

@page {
    size: A4;   /* auto is the initial value */
    margin: 1.54cm 1cm 1.54cm 1cm;
    marks: crop cross;
}
html, body {
    -webkit-print-color-adjust: exact;
    margin:0;
    padding:0;
    height:100%;
    min-height: 100%;
    border: 2px solid #cc0000!IMPORTANT;
}
.contract {
    min-height:100%;
    position:relative;
    height: 100%;
    box-decoration-break: clone;
}
h2, h3 { 
    page-break-after: avoid; 
}

Screenshot with BUG: http://scr.hu/0fbv/5u4qh

j08691
  • 204,283
  • 31
  • 260
  • 272
EzraMod
  • 17
  • 1
  • 5

1 Answers1

0

I was having a similar problem. Here is how I did it: #body { border-style: solid; border-color: red; }

If this doesn't work, try putting the border color directly into the media. Remember to add border-style: solid; first, through.

GroxTheProgrammer
  • 431
  • 1
  • 6
  • 12