How do I format html to be most suitable for printing?

Discussion in 'ASP .Net' started by Raymond Du, Dec 5, 2004.

  1. Raymond Du

    Raymond Du Guest

    Hi,

    I have serveral web forms used by users, these users often use IE browser
    print function to print out the form, the problems I have is what users see
    on the screen is usually different from what's being printed. Somtimes it
    looks good on screen, but it wraps differently in printing. How do I format
    the HTML so it will look the same in screen and printing? The paper size is
    always 8.5x11, should I set HTML to a certain width say 600px?

    TIA
    Raymond Du, Dec 5, 2004
    #1
    1. Advertising

  2. Raymond Du

    Karl Seguin Guest

    You can use CSS exclusively for printing by specifying "print" as the media
    value:

    <link rel="stylesheet" href="styles.css" type="text/css" media="screen">
    <link rel="stylesheet" href="print.css" type="text/css" media="print">

    When users browse to the page in IE/Moz/... the styles.css will be used.
    When they print, the print.css will be used. This allows you to have fine
    grained control over how things look in printing. That's really the best
    way to have total control over how things look when printing.

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Raymond Du" <> wrote in message
    news:%...
    > Hi,
    >
    > I have serveral web forms used by users, these users often use IE browser
    > print function to print out the form, the problems I have is what users

    see
    > on the screen is usually different from what's being printed. Somtimes it
    > looks good on screen, but it wraps differently in printing. How do I

    format
    > the HTML so it will look the same in screen and printing? The paper size

    is
    > always 8.5x11, should I set HTML to a certain width say 600px?
    >
    > TIA
    >
    >
    Karl Seguin, Dec 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. H.MuthuKumaraRajan
    Replies:
    3
    Views:
    415
    H.MuthuKumaraRajan
    Feb 4, 2004
  2. mark4asp
    Replies:
    1
    Views:
    385
    mark4asp
    Jan 21, 2005
  3. David Spencer
    Replies:
    0
    Views:
    368
    David Spencer
    Jan 28, 2005
  4. Ethan V
    Replies:
    5
    Views:
    365
    Ethan V
    Jun 27, 2006
  5. xkenneth
    Replies:
    8
    Views:
    327
    Bruno Desthuilliers
    Feb 6, 2008
Loading...

Share This Page