nikoloza
nikoloza

Reputation: 966

@page css media does not work for Chrome and IE

I've got some question about @page css media tag.

So I read some documentation written by w3 and Microsoft, but anyways no effect with it.

Following the link http://msdn.microsoft.com/en-us/library/ie/ms530841(v=vs.85).aspx when I use the parameters like they say, it does not work for me.

I even can't find any other example how to numerate pages in browser print media.

Can anyone help me?

Updated

here is my snippet for it. Margins work correctly, but counting dont.

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

    @bottom-center {
        content: "page " counter(page);
    }
}

Upvotes: 2

Views: 6021

Answers (1)

Sahil Popli
Sahil Popli

Reputation: 1995

CSS3 Counters have to be reset before they can be used

Try This once

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

    @bottom-center {
    counter-increment: page;
    counter-reset: page 1;
        content: "page " counter(page);
    }
}

More info

Upvotes: 2

Related Questions