View Full Version : Using @page in CSS

02-04-2004, 08:28 PM
I can't find an example of how the @page rule is used. My needs are simple. I just want my pages, when printed, to have a font size of 18pt and a margin of 2 inches.

In the HTML I included this:
<link rel="stylesheet" type="text/css" href="stylesheet_print.css" media="print">

In stylesheet_print.css I included this:
body {
font-size: 18pt;

@page {
size: 8.5in 11in;
margin: 2in;

I get a printout that has 18pt text, but the margin is just the default margin for the browser. The results are the same in IE6 and Moz1.5.


Mike Wilkinson

02-04-2004, 11:21 PM
Thanks to help from a wise person on another forum, I am now able to answer my own question. Basically, IE and Moz do not support the @page rule. Darn!

Here's a link that shows only Opera supporting @page:

Browser Support (http://www.westciv.com/style_master/academy/browser_support/printing.html)

Good luck!

Mike Wilkinson