10-08-2012, 05:40 AM | #1 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
Blank lines & top margins
I have achieved quite nice-looking ePub. But when I converted it to old mobi (with Calibre), all the 'margin-top: X em' were ignored.
Now, I was not very surprised, 'cause I am fairly sure that's normal behavior. BUT - before I changed top margin to 1em, it was something like 9 or 19em with the result that there was huge empty space before every chapter and in addition chapter heading and some first lines were missing (on my small screen, on PC they barely fit). So, 'margin-top: 19 em' wasn't ignored. Why? So far the only way I know how to get empty line in the text is <br /> (or <div></div>, but I'm not yet comfortable with divs). Is there any other method? Top margin 35% works nicely in ePub, but mobi ignores it. What can I do to move dedication lower on the page and still have nice ePub too? Same for 'margin-top: 3 em' - I'd rather not use <br /><br /><br />, but at the moment it's the only solution I am sure will work. TIA! |
10-08-2012, 06:29 AM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Could it be that you should write "1em" and not "1 em" (note no space between number and unit)?
|
10-08-2012, 07:06 AM | #3 |
Grand Sorcerer
Posts: 27,548
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
While it's true that MOBI doesn't use the margin-top property (or any css for that matter), I've found that calibre is usually very good at converting margin-top to MOBI's equivalent (basically) "height" property. I'd guess it's the space issue Jellby mentioned, since I know from experience that calibre can/will do what you want it to do.
|
10-08-2012, 07:06 AM | #4 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
No, actually there's no space between 1 and em.
|
10-08-2012, 07:09 AM | #5 |
Grand Sorcerer
Posts: 27,548
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Can I ask what you're viewing the resulting mobi to determine that it's not working?
I've just verified that my ePub with the dedication code: Code:
<p class="dedication">to Jill</p> Code:
p.dedication { margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 4em; text-indent: 0; text-align: center; } Don't use calibre's viewer to test whether or not it's working. Last edited by DiapDealer; 10-08-2012 at 07:17 AM. |
10-08-2012, 07:20 AM | #6 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
.calibre14 {
display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 3em; text-align: center; text-indent: 0} has empty 1 line only thanks to inserted <br />. .calibre22 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 2em; text-indent: 0} is first paragraph and has no space separating it from the heading. ps. I'm using Mobireader for PC and for Palm - so far they look alike. I'm really only interested in palm version anyway. Last edited by travger; 10-08-2012 at 07:24 AM. Reason: ps |
10-08-2012, 07:40 AM | #7 |
Grand Sorcerer
Posts: 27,548
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Sorry, I can't test the Palm version, but MobiReader for PC is correctly displaying the very same code (mine) above after using calibre v0.9.0 to convert to MOBI, as well. So I'm a bit baffled. Are you absolutely certain the stylesheet is being linked to that particular html file in the original ePub?
|
10-08-2012, 07:49 AM | #8 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
I just unpacked both mobis:
Mine has <p height="0pt" width="1em" align="justify"> for every paragraph while original has <p height="9em" width="0pt"> for the first paragraph. Of course I could doctor the html in mobi instead of ePub, but my goal is to delete mobis and convert the ePub if I want to re-read.. That means I have to learn what changes work or I'll have exactly same issues in the future. @DiapDealer - what conversion settings did you use? |
10-08-2012, 07:58 AM | #9 |
Grand Sorcerer
Posts: 27,548
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I used whatever my default settings are -- which are going to be very, very close to whatever calibre's defaults were originally. Absolutely nothing is checked/changed in the "Look & Feel" section and absolutely no Heuristics enabled. Nothing is check-marked in the "MOBI Output" section and the MOBI file type is set to "old."
|
10-08-2012, 08:12 AM | #10 | |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
Quote:
I have seen em scenebrakes ignored before and was sure that it's normal behavior, but now when you said otherwise, it seems like a fault in conversion settings. |
|
10-08-2012, 08:26 AM | #11 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
Yee-haw!
I had 'remove spacing between paragraphs' checked! Now at last I have got mobi to look like ePub was! Does a little embarrassed victory dance Thanks!!! |
10-08-2012, 08:35 AM | #12 | ||
Grand Sorcerer
Posts: 27,548
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Make sure each html file as a line similar to Code:
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" /> Quote:
EDIT: Never mind, it appears you found the culprit. |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mobi -> pdf; top & bottom margins 0, links disabled | rglk | Conversion | 5 | 11-13-2012 10:05 AM |
Top & Bottom Margins in viewer | mapline | Calibre | 5 | 07-13-2012 10:11 AM |
Blank Lines | jreidu | Workshop | 2 | 07-20-2011 05:11 AM |
FB Reader version & blank lines | franklekens | PocketBook | 2 | 03-01-2010 04:38 AM |
Blank Lines | vivaldirules | Upload Help | 55 | 03-02-2009 03:17 PM |