![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
CSS for KindleGen2
I'm looking for some advice or a CSS template to use when converting ePubs (EPUB2) to Mobi via KindleGen2.
I'm finding most of my CSS converts well, but there a few rouge elements in some previews. For example, in the new Kindle Previewer, my chapter headings look fine for Kindle/KindeFire/KindleDX - but they are huge when previewed in Kindle for iPhone/iPad. Is there a CSS setting which works well across all the Kindle preview options? Here's some of my CSS for reference: Normal text is: p.body { font-weight : normal; font-style : normal; font-size : 1em; text-decoration : none; font-variant : normal; line-height : 1.2; text-align : justify; color : #000000; text-indent : 16px; margin : 0px; widows:2; orphans:2; -webkit-hyphenate-before:3; hyphenate-before:3; -webkit-hyphenate-after:3; hyphenate-after:3; -webkit-hyphenate-lines:2; hyphenate-lines:2; } Chapter headings are: h1.chapter-title { font-weight : bold; font-style : normal; font-size : 1.17em; text-decoration : none; font-variant : normal; line-height : 1.2; text-align : center; color : #000000; text-indent : 0px; margin : 50px 0px 16px 0px; -webkit-hyphens: none !important; adobe-hyphenate: none !important; -moz-hyphens: none !important; hyphens: none !important; } Thanks! |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
With the ability to define separate CSS for KF8 and the regular MOBI part, there's really no reason to try and find "One CSS to Rule Them All."
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
You may have a point! I'm still yet to figure out how Kindle handles CSS, if it essentially doesn't use CSS.
Do you know which CSS the KindlePreviewer for iPad/iPhone uses? |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
The new KF8 format does use CSS (very similarly to ePub), but the Kindle Fire is currently the only device that supports KF8 (the various reading apps will likely support KF8 sometime in the future). So right now... KindlePreviewer and Kindlegen are building a hybrid MOBI that contain both the regular-old MOBI and the new KF8. Devices that support KF8 will use that (currently only Kindle Fire) and everything else will use the fall-back MOBI. The new Kindle Publishing Guidlines (Section 8: Media Queries) provides about four different ways to differentiate between the CSS that's used to build the MOBI and CSS that's used to build the KF8. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Override ePub CSS with userStyle.css? | barium | Sony Reader Dev Corner | 11 | 07-16-2011 03:25 PM |
CSS Help Please | Japes | Calibre | 21 | 06-23-2011 05:05 PM |
epub CSS versus "Regular" CSS | konrad | ePub | 4 | 02-18-2011 09:29 AM |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |
Help with CSS, anyone? | rogue_ronin | Workshop | 36 | 08-14-2009 09:28 PM |