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

  • Thread starter Thread starter Raymond Du
  • Start date Start date
R

Raymond Du

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
 
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
 
Back
Top