Quote:
Originally Posted by anacreon
I've just had problems with a poor epub (converted to kepub when transferred to the reader), where I lost a line of text at the bottom (saw just the extreme top of a few letters). I noticed that it had no page_style, so copied one from a good epub and set it to 5 pt top and bottom.
I've tried adding it to my added CSS for conversions, so
body { orphans: 1; widows: 1; } div, p , blockquote {line-height: 1.0}, page { margin-bottom: 5pt; margin-top: 5pt }
but don't know whether it is the right syntax. The beginning was copied from some advice somewhere, and I have no knowledge of the language (Python is it?).
I'd welcome advice.
|
I would suggest to put all your prefered default settings in the body selector.
This is what I usually define as my default preferences:
Code:
body {
border-width : 0;
font-family : ACaslonPro, serif;
font-size : 100%;
font-style : normal;
font-variant : normal;
font-weight : normal;
line-height : normal;
margin : 0;
orphans : 1;
padding : 0;
text-align : justify;
text-indent : 0;
widows : 1;
}
div, p {
margin:0;
padding:0;
}
Probably, not all selectors are really necessary as some of my default settings are identical to the device defaults. I add them here only to 'guarantee' the outcome and avoid 'unpleasant' surprises.
The other selectors you use should only describe what is different from your default settings.
Not like this:
Code:
.indent {
margin: 0;
padding: 0;
text-indent: 1em;
}
but like this:
Code:
.indent {
text-indent: 1em;
}
This also makes or keeps the epub most flexible and all device features can be adjusted by the user. Like font adjustments, margin adjustments, etc.
@page rule
Use this rule only if you read in
full screen mode. Only then the reader overrides the hard coded default top and bottom margins that Kobo has added to the firmware.
As long the pageometer is still visible at the bottom of the screen you are not reading in full screen mode.
As mentioned in other post(s) in this thread, most publishers include a @page rule to the CSS and therefore adding a @page rule is not necessary. If it needs tweaking, then modify the orginial @page rule.
Don't use the @page rule to define a left and/or right page margin (margin-left: 5pt;margin-right: 5pt). This will cut off any character with a negative right side bearing.