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

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
 
K

Karl Seguin

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top