Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Print stylesheet - padding on the second page

Tags:

css

printing

I'm designing a print stylesheet for a document which will run to a few pages. I want every page to have a company logo at the top, and top padding of 5 centimeters, so I did this:

body {
 background:url(logo.png) no-repeat center top;
 padding-top:5cm;
}

The logo appears on each page as requested, perfectly. But the top padding only appears on the FIRST page, and every subsequent page has padding-top of zero.

Am I doing something wrong? How can I get the top padding on EVERY page?

like image 637
Heraldmonkey Avatar asked Aug 11 '13 15:08

Heraldmonkey


1 Answers

This may be because padding is counted relative to body tag. Use padding-top style with immediate wrapper element after body tag.

like image 164
Ashwani Avatar answered Sep 29 '22 12:09

Ashwani