Home >Web Front-end >CSS Tutorial >Why Are CSS Page Numbers Not Working in All Browsers?
Despite the promise of adding page numbers using CSS, developers have encountered challenges in implementing this feature. While the @page and @bottom-right rules may seem straightforward, their support across web browsers remains limited.
According to a Wikipedia comparison of layout engines, browser support for margin boxes, which are necessary for page numbering, headers, and footers, is currently lacking. This limitation has hindered the widespread usage of CSS-based page numbers for printed versions of web pages.
The solution offered by PDF conversion provides a workaround, albeit with additional steps and potential formatting issues. Therefore, developers seeking to incorporate page numbers into printed documents may need to reconsider their approach and explore alternative solutions until browser support improves.
The above is the detailed content of Why Are CSS Page Numbers Not Working in All Browsers?. For more information, please follow other related articles on the PHP Chinese website!