Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3614952
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:18:47+00:00 2026-05-18T22:18:47+00:00

I can get a header to print on each page, but I’m new to

  • 0

I can get a header to print on each page, but I’m new to print margins. I thought the @page css would work, but it does not seem to affect page margins. If I set the margins on the body, it works on page one, but subsequent pages start the top margin at the default, putting the header over top of the text.

<style>  
.header {  
 position: fixed;  
 top: 0;  
}  
@page {  
 size: 11in 17in;  
 margin-left: 1in;  
 margin-right: 1in;  
 margin-top: 1in;  
 margin-bottom: 1in;  
} 
</style>

<body>  
<span class=header>This is the header</span>  
This is the text of the document. (repeat until I get to page 2)  
</body>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:18:48+00:00Added an answer on May 18, 2026 at 10:18 pm

    Printing support by all browsers is very poorly supported with horrendous bugs in many popular browsers that have gone unfixed for years.

    The short answer is to avoid HTML/CSS printing if you need to ensure a specific layout. Use PDF, possibly dynamically generated on-demand. There’s various PDF generator APIs such as iTextSharp. It’s possible to print from Flash, but only if Flash is installed and working (i.e. no Flashblock, iOS).

    HTML/CSS printing should be restricted to simple layouts. Form printing is a nightmare with fieldset & legend support being especially problematic (particularly on Firefox). Interestingly printing support is best on the internet explorers.

    The CSS3 printing support specification hasn’t been completed and is some time off.

    General principles:

    • No backgrounds or background CSS images are supported (by default – users can change their browser settings for an intranet application). Only foreground images print.

    • Widths need to be fluid as page sizes vary around the planet. US Letter format is shorter and wider than A4 layout

    • All browsers support printing in different ways. Bugs are legion.

    • Test using print preview.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made a header image, but for some reason I can't get it to
I have a bunch of CSS files that get loaded on every page (header,
Can't get Location header from response at all. Wireshark says that i've got one:
Can I get http respone header fields parsed with nutch? Is it built-in capability
My question is, how can I get text from header in javascript? So if
I can't get didAccelerate to trigger. I have the delegate implemented in my header
I have a UIImageView in a UITableView Header. How can I get the exact
I know you can do this to get vertical text in a tab header:
I can get the file path with: (message (file-name-directory (or buffer-file-name load-file-name))) But if
This may be asked in multiple forums but I just can't get it working.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.