Hi,
First up my development files are EPUB but I am creating .epub files and .mobi files. I use kindlegen with the 'content.opf' file to generate my .mobi files.
I've been having some difficulty inserting a larger than normal gap between some paragraphs. That is to say I am NOT trying to change the default spacing between paragraphs but trying to insert gaps of different sizes between some paragraphs. e.g. In some books an extra large gap is introduced between 2 paragraphs in a chapter; sometimes a symbol is used, sometimes not. It denotes a change of scene or tone, or is used for a variety of reasons to tell the reader that the sections on either side of the larger-than-normal gap are to be considered separate. In other cases introducing smaller or larger gaps can also be useful.
The following HTML and CSS works as expected with my .epub files but NOT with my .mobi files.
The idea is that I use CSS to change the font size and output a single space entity to introduce various sized gaps. By using em for the font size the gaps can remain relative to the text size the user has chosen. By having small, medium, and large versions a gap of various standard sizes can be easily introduced (and of course I can change the sizes this is all at the testing stage).
The problem is that the gap sizes are not the sizes I expect with my .mobi files. They are as I expect with the .epub files.
With the .mobi files 'small' instead of being about half a line (0.5em) of the text lines above and below them (1em) looks about 1 line. 'Medium' looks like at least 2 lines instead of 1. 'Large' about 3 lines instead of 2.
Code:
HTML:
<p class='InsertGapSmall'> </p>
<p class='InsertGapMedium'> </p>
<p class='InsertGapLarge'> </p>
CSS:
.InsertGapSmall {
display: block;
font-size: 0.5em;
margin: 0;
}
.InsertGapMedium {
display: block;
font-size: 1em;
margin: 0;
}
.InsertGapLarge {
display: block;
font-size: 2em;
margin: 0;
}
.ParaNormal {
display: block;
font-size: 1em;
margin-top: 0.25em;
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
text-align: justify;
text-indent: 5pt;
}
Real world usage:
<p class='ParaNormal'>A full paragraph of text before the gap...</p>
<p class='InsertGapMedium'> </p>
<p class='ParaNormal'>A full paragraph of text after the gap...</p>
Can anyone tell me what I am doing wrong with this approach please? Why it works with .epub files but not with .mobi files? Any suggestions for an alternative method to achieve what I want would also be greatly appreciated.
Many thanks.