Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-19-2011, 01:40 PM   #1
gdgibson
Member
gdgibson began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Apr 2011
Device: All
Mobi (Kindle) formatting issues

I think I already know the answers to these questions, and when I've been formatting for Kindle before, they've either not come up or I've found a workaround. But I'm doing a conversion for someone who doesn't own a Kindle and is instead previewing on Kindle for Mac. So -

1. Can I use percentages in the margin-top attribute on a Kindle?
2. Is there any way to center images vertically on a Kindle?

I think the answer to both questions is no, but I could be wrong, and I'd love to have my guess confirmed.

Beyond that, though, I'm wondering if anyone has any suggestions for making text and images look that look "right" on Kindle 1 or 2 look "right" on the other platforms - DX, Mac, PC, iPad, etc.
gdgibson is offline   Reply With Quote
Old 04-19-2011, 03:45 PM   #2
bfollowell
Fanatic
bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.bfollowell ought to be getting tired of karma fortunes by now.
 
Posts: 510
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Amazon Kindle 3 Wi-Fi & B&N Nook Tablet & B&N Nook HD+
Quote:
Originally Posted by gdgibson View Post
1. Can I use percentages in the margin-top attribute on a Kindle?
Yes.

I'm not sure about the second question.

- Byron
bfollowell is offline   Reply With Quote
 
Enthusiast
Old 04-19-2011, 08:47 PM   #3
gdgibson
Member
gdgibson began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Apr 2011
Device: All
Great! Thanks.

So the margin-top percentage attribute - is that something that can go into the epub CSS template, which will then be picked up when converted to mobi (using Calibre)? What's the best way to tinker with a mobi file?

I'm using percentages now, and I know it's working in the epub - it works in both Calibre and ADE (and maybe in the Kindle previewer with the device set on "Kindle" and "iPhone"). But it doesn't seem to be working when I set the device in previewer to DX or iPad. Nor when I look at the book in the Kindle for Mac reader

There has to be some way to make layouts remain consistent across the various Kindle platforms - after all, you can only distribute one version via DTP - and I would appreciate any resources that anyone knows of that address this issue.
gdgibson is offline   Reply With Quote
Old 04-20-2011, 04:01 AM   #4
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: 5,790
Karma: 4027751
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
Note that, in the CSS spec, percentages in margin-top are not calculated in relation the the height, but to the width, so a "margin-top: 50%" does not mean you will se half a blank page.

The Mobipocket documentation is not clear in this point. It allows percentage in vertical space, but it does not say what is the reference.
Jellby is offline   Reply With Quote
Old 04-20-2011, 07:39 AM   #5
gdgibson
Member
gdgibson began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Apr 2011
Device: All
Yes, that proportionality to the width is great, if you think of it as an approximation of the golden cannon.

Again, though, while percentages seem to work on an actual Kindle 1 (my device), 2, or 3, judging by the Kindle previewer something else seems to be happening with the DX and iPad - and in Kindle for Mac.
gdgibson is offline   Reply With Quote
Old 04-22-2011, 12:42 PM   #6
gdgibson
Member
gdgibson began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Apr 2011
Device: All
An answer:

I don't know if percentages work, but Joshua Tennent recommends that you avoid defining margins with anything other than pixels. After trying a variety of percentages and em values I finally used pixels to define my top margin values (as a text style attribute in the CSS template), and it worked on the Kindle and on Kindle for Mac - though it took some experimentation to get a value that looked "right" both on KfM and on an actual Kindle.

Percentages would be much more useful - for example, the way my title page is formatted now, you'd have to scroll past a significant amount of white space to find the title on the title page on an iPhone - but I could not seem to get percentages to work at all.

Thanks, bfollowell and jellby, for your help!
gdgibson is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting issues solloron1 Kindle Formats 5 04-12-2011 01:01 PM
RTF to Mobi to Kindle: Table Border and Formatting are lost Starko Calibre 12 12-20-2010 05:46 AM
mobi conversion - kindle chapter marker issues foghat Calibre 10 09-29-2010 07:46 PM
Mobi for Kindle issues jefffish Calibre 0 09-17-2010 11:16 AM
Formatting issues with .prc files generated from Kindle ebooks PressEnter Kindle Formats 2 06-07-2010 07:30 PM


All times are GMT -4. The time now is 04:59 PM.


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