user3336441
user3336441

Reputation: 11

CSS Paged Media Contents Issue

when printing HTML page I want to put custom text in header an all printed pages

@page {
    margin-top:5mm;
    margin-bottom: 25mm;
    margin-left: 30mm;
    margin-right: 30mm;

    @top-right{
        content: "Page title"; /* page title + current page count */
    }
}

While printing, the "Page Title: pageCount" does not appear neither in IE nor in any other browsers.. What am I doing wrong? Margins do work, but not the @top-right.

Upvotes: 1

Views: 403

Answers (1)

Nathan Sorensen
Nathan Sorensen

Reputation: 91

I think the issue is that there is no browser support for @top-right and the other page margin boxes.

If rendering the content to a PDF prior to printing is an option for you, the Prince PDF generator appears to support margin boxes.

http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(Cascading_Style_Sheets)#Grammar_and_rules

Upvotes: 2

Related Questions