Loading ...
Sorry, an error occurred while loading the content.

CSS @page

Expand Messages
  • wilkinsonm
    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
    Message 1 of 3 , Feb 4 12:31 PM
    • 0 Attachment
      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.

      Thanks!

      Mike Wilkinson
    • loro
      ... It looks like the answer is that basically it doesn t work. :-( Lotta
      Message 2 of 3 , Feb 4 1:12 PM
      • 0 Attachment
        wilkinsonm wrote:
        >I can't find an example of how the @page rule is used.

        It looks like the answer is that basically it doesn't work. :-(

        <http://www.westciv.com/style_master/academy/browser_support/printing.html>

        Lotta
      • wilkinsonm
        Thanks for the tip and the useful link Lotta. Mike Wilkinson
        Message 3 of 3 , Feb 4 1:48 PM
        • 0 Attachment
          Thanks for the tip and the useful link Lotta.

          Mike Wilkinson
        Your message has been successfully submitted and would be delivered to recipients shortly.