Quote:
Originally Posted by koadic
I think I see what may be causing your issue, but it is only speculation as I don't have an iPod/Pad/Phone to test it on. In the style.css, try removing the 'height: 100%;' from the 'html, body' section and see if that remedies your situation. I believe that it is limiting everything wrapped by the html and body tags (each xhtml file) to '100%' of one ePub 'page', although one 'page' usually equals two 'screens' at normal font sizes (which is what you're getting).
Code:
html, body {
height: 100%;
margin: 0;
padding:0;
border-width:0;
}
The only time I would use the 'height: 100%;' (in the .css) or 'height="100%"' (inline) is for an img tag that I want full screen, but in those cases I find it even better to use svg instead.
|
Yeah, that was the obvious first candidate. I tried deleting that section of code as soon as I heard about the problem. I sent the new file to an iGuineaPig - no change. It seems I am just going to have to keep commenting out code until I figure out the source of the problem. Rather than irritate my iGuineaPig with 30 different files, I have had to accept that I am just going to have to get my hands on an iPad for a few hours
The combination of
Code:
html, body { height: 100%; margin: 0; padding:0; border-width: 0; }
@page { margin: 5pt; }
is very common in epub tutorials.
Even on the MobileRead wiki itself.
Quote:
Originally Posted by koadic
Another couple things I see that you might want to do differently in the style.css (coming from my own experience) are:
Try to eliminate adding 'margins' to the top of paragraphs, and instead try to only add to the bottom. If you must add to the top, try to use 'padding' instead. For instance, the first time I opened up the epub in ADE, one of the paragraphs with the 'centerplusgap' class only showed half of the line (vertically), as the specified 'margin-top' of 2em pushed the bottom half of the line below the screen. If you had used padding, that line would have been pushed to the next page instead.
|
Ah, but Kindlegen doesn't convert padding, only margins, and I had to provide a mobi version as well as an epub *sigh*
As for margin-top vs margin-bottom - have you ever used FBReader? For some reason it can't view margin-bottom, only margin-top. And a surprising number of cheap ereaders, like my awful Binatone LCD reader, use a version of FBReader (probably because it can run on Linux and is open source). So I tried to cater for that by picking margin-top instead of margin-bottom.
Quote:
Originally Posted by koadic
In addition, since you already specified a margin-top (again, you should use padding instead) and -bottom for 'p', there is no need to do so for every additional p.class, you only need to include whatever you want changed from the initial settings (such as text-indent, as you change it from 2em to 0em, or adding a text-align).
|
Yeah, I'll hold my hand up to that as being just a particular quirk of mine. For some reason I find it easier to troubleshoot weird errors if I lockdown what I want in my unusual classes, even if that particular, say, indent, is already covered by my initial settings. OK, so it's not exactly best practice but it's helped me figure out quite a few odd problems so I'll stick with it
So, in summary, Apple, Amazon and cheap ereader makers are driving me insane :-D