title: Print page numbers on pages when printing html
body: <p>I've read a lot of web-sites about printing page numbers, but still I couldn't make it display for my html page when I try to print it.<br>
  So the CSS code is next:<br></p>
  
  <pre><code>@page {
    margin: 10%;
  
    @top-center {
      font-family: sans-serif;
      font-weight: bold;
      font-size: 2em;
      content: counter(page);
    }
  }
  </code></pre>
  
  <p>I've tried to put this page rule inside </p>
  
  <pre><code>@media all {
      *CSS code*
  }
  </code></pre>
  
  <p>And outside of it, tried to put it in <code>@media print</code>, but nothing helped me to display the page numbers on my page. I've tried to use FireFox and Chrome(based on WebKit as you know). I think the problem is in my html or css code.<br> Could somebody show me an example of implementing this <code>@page</code> rule in the big html page with several pages? I just need the code of html page and the code of css file, that works. <br>
  P.S. I have the latest supported versions of browsers.</p>