Using @page in CSS fails when printing frame

Discussion in 'Internet Explorer' started by jonas, May 8, 2012.

  1. jonas

    jonas Guest

    I have a web page on which I want to control my print margins. Works great using IE8 and the CSS @page directive. But when I put the same page in a frame and print it the correct content is printed but the margins are all back to default - my @page directive is ignored. In the same page I use "page-break-before: always" and that still works when printing the frame, but @page is ignored.

    Should I do somthing special to make printing from a frame understand @page?

    A short code snippet to clarify what I do:
    ....
    <HEAD>
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    ....
    <style type="text/css" media="print">
    @page {
    margin-left: 0.1in;
    margin-right: 0.1in;
    margin-top: 0.5in;
    margin-bottom: 0.5in;
    }
    .pagebreak {page-break-before: always;}
    </style>
    ....etc

    </HEAD>
    <BODY>
     
    jonas, May 8, 2012
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.