Jump to content

How to let header pane only appear on first print page?


pstein

Recommended Posts

I have a webpage which contain the following element:

<heaeder class="site-header">
....
</header>

With CSS class definition as follows:
                            
.site-header {
    position: relative;
    z-index: 223;
    ....
    box-shadow: none;
}

 

When I print now this (long) web page into a pdf doc file then this header pane appears at the top of each pdf page.

How can achieve that this header pane appears only at the FIRST pdf page?

Thank you

Peter

Edited by pstein
Link to comment
Share on other sites

It happens when element use position: fixed, by adding this to your style.css at bottom of page this should override fixed positioning.

 
@media print {
body .header-top {

     position: static;

}
}
You may need to adjust the padding/margin styling of elements below it as a gap appears.
Edited by dsonesuk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...