SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot detzX's Avatar
    Join Date
    Oct 2006
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Printing...some browser have margins set.

    How can I get around how some browsers(or users can change them) have auto margins already and some browser don't have any when you print a page. I printing invoices and I need to have absolute positions but on some browser it runs off the screen because of the auto margins. Am I going to have to tell users to change this?
    www.invoicejournal.com - Invoice clients for Free

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you using a print stylesheet? If so, what's in it?

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,788
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Some printers have built in margins so that you can never get an exact positioning with HTML. The best you can do is to keep the width below 750 pixels as that allows for the fixed margins that the printer may have.

    If you want to control the position of text more accurately than that you need to use a PDF rather than HTML.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •