If I were to embark on the ambitious task of writing a book solely using HTML and CSS, where would I begin in defining a page header and footer with page numbers? How can I ensure that page breaks and margins are displayed in the browser, akin to a preview mode?
I understand this may seem like a request to have the code handed to me, but what I truly seek are pointers to resources that can guide me through this unconventional project. I am at a loss on how to even initiate such a venture.
My vision for the browser preview is to have miniature versions of each page, reminiscent of a PDF viewer, where text overflow triggers a page-break:
While I have explored @media print, I have yet to find a way to incorporate headers and footers within it.
My attempts to implement the code from w3.org have been unsuccessful:
title { position: running(header) }
@page { @top-center {
content: element(header) }
}
Although I found the code in Boom! helpful for printing purposes, it does not render the same in the browser.
With that said, I am in need of guidance on where I should turn to for a solid starting point on this endeavor. Any recommendations?