Quote:
Originally Posted by ElMiko
I know there are some strong feelings out there about trying to simulate paperbook layouts in the context of reflowable, re-sizeable ebooks. For example, I've seen repeated calls against top margins on chapter headings or simulating text that starts "half-way" down the page, presumably because screen sizes and text sizes could potentially result in blank pages, unusual gaps between text, etc.
However...
I'm wondering how the pros here handle content that is seemingly necessary to format with various top & bottom margins and variable font sizes (see attached image). Do you assume a certain font-size (i.e. assume 1em is the size of some referent physical book, or assume a certain number of lines of text per ereader page) and screen size and hope for the best? What are these assumptions?
|
Where are you going to work? Under epub2 or epub3? Do you want the epub for KDP? It's not the same

Do you want the font-size to affect all elements or just the body text? For example, you can make it so that if the user increases or decreases the font size, some (or all) headings are not affected, they always remain the same size (in a title page, for example, that could be a good option).
Top and bottom margins where? Titles, paragraphs? For main titles (the titles that start a chapter) for margins I use "%" (or vh), especially for margin-top; for others titles I usually employ "em" and for paragraphs always "em". For blockquotes, for left and right margins I also employ "%" (or vw) and depending on the type of blockquote, for top and bottom margin I can use either "em" or "%".
In my stylesheet, I always (or almost always) have:
Code:
body {
font-size: 1em;
...
}
so that all font sizes are referenced to body and are consistent. This way, I can also change the text size of all elements in one place.
For images, if they are not full page, I give them a specific height (in "%" or "vh") and use SVG wrappers, this way they maintain their proportions even on small screens.
And regarding the screenshot you uploaded, you can make that same layout remain unchanged, even by changing the font size, also in a reflowable epub (of course, that page alone will not change, the rest will be affected by changes in font size).