I have the following CSS:
@media print { div.question-list-footer { position: fixed; bottom: 0; padding-left: 180px; } div.question-list-footer-center { text-align: center; } @page { counter-reset: page 1} } #pageNumber:after { content: counter(page); } #pageNumber { counter-increment: page; }
and the following html on my page:
<div class="question-list-footer"> <div class="question-list-footer-center"> <span>Page Number: <span id="pageNumber"></span></span><br/> Date: @firstItem.Date.Value.ToShortDateString() Id: @firstItem.Id </div> </div>
and this works when printed, except that all pages have "Page Number 1". (IE9, Chrome and FF) I looked at this and played with it for ages and still do not understand why. Anyone have a problem? βPlease tell me this is not obvious.β (FWIW - Chrome doesn't like my bottom).
source share