Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 10-08-2012, 05:40 AM   #1
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
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!
travger is offline   Reply With Quote
Old 10-08-2012, 06:29 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
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)?
Jellby is offline   Reply With Quote
Old 10-08-2012, 07:06 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
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.
DiapDealer is offline   Reply With Quote
Old 10-08-2012, 07:06 AM   #4
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
No, actually there's no space between 1 and em.
travger is offline   Reply With Quote
Old 10-08-2012, 07:09 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
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>
and the following CSS
Code:
p.dedication {
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 4em;
    text-indent: 0;
    text-align: center;
    }
definitely works as expected when converted with calibre to mobi (and viewed with Kindle Previewer or an actual Kindle device).

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.
DiapDealer is offline   Reply With Quote
Old 10-08-2012, 07:20 AM   #6
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
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
travger is offline   Reply With Quote
Old 10-08-2012, 07:40 AM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
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?
DiapDealer is offline   Reply With Quote
Old 10-08-2012, 07:49 AM   #8
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
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?
travger is offline   Reply With Quote
Old 10-08-2012, 07:58 AM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
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."
DiapDealer is offline   Reply With Quote
Old 10-08-2012, 08:12 AM   #10
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
Quote:
Originally Posted by DiapDealer View Post
Are you absolutely certain the stylesheet is being linked to that particular html file in the original ePub?
I have no gripes about ePub - it looks rather nice and I'm able to change it as I like. So I suppose it has to be linked to css. And 'that particular html file' is every file (all chapters begin right below chapter heading in mobi, while in ePub there is 2em space).

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.
travger is offline   Reply With Quote
Old 10-08-2012, 08:26 AM   #11
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
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!!!
travger is offline   Reply With Quote
Old 10-08-2012, 08:35 AM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by travger View Post
I have no gripes about ePub - it looks rather nice and I'm able to change it as I like. So I suppose it has to be linked to css. And 'that particular html file' is every file (all chapters begin right below chapter heading in mobi, while in ePub there is 2em space).
I wouldn't suppose anything at this point.
Make sure each html file as a line similar to
Code:
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
in the head section. Where the path matches the name and the location of your particular CSS file, of course.

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.
Definitely not "normal." I've never had to struggle at all to get calibre to honor the margin-top property of an ePub's CSS classes. Your indication that the unpacked mobi's paragraphs are all identical is a clear indication to me that either the ePub's CSS is not being applied anywhere ... or that you're overriding the ePub's CSS with a calibre conversion setting.

EDIT: Never mind, it appears you found the culprit.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 01:03 PM.


MobileRead.com is a privately owned, operated and funded community.