tags:

views:

2010

answers:

2

Hello;

How can I code a CSS style to force specific page margins for a web page when printing, and be valid for IE and Firefox ?

+3  A: 

Use the media type "print" (@media print).

Don't set a fixed width nor a maxwidth. Make the content fluid instead. If you specify any with (px, em, pt, cm) you will always run into one or the other problem because different browsers add different margins.

A4, letter, A3, it's not your concern. Your document doesn't care. The user can print your document on whatever paper he has available because your content is fluid.

Find some tips about css for print here.

tharkun
A: 

Further to Tharkun's answer, there's a couple articles by Eric Meyer that might prove relevant to you:

David Thomas