09-12-2016, 10:16 AM | #1 |
Zealot
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
|
Kindle for iPad - CSS for tables broken?
Has anyone seen this odd behaviour in Kindle for iPad app (also iPhone)?
I'm working on a project that needs moderately complex tables and also multiple table types. BUT the CSS formatting is screwing up on this particular app. The CSS is fine in a browser and ALL OTHER eBook readers I can test for including the Kindle previewer. Here's a super-simple example. Code:
<table class = "table1"> <tr><th>header cell</th></tr> <tr><td>normal cell</td></tr> <tr><td class = "r">r-type cell</td></tr> </table> Using 'normal' css: Code:
table.table1 th{background-color:#f00;} table.table1 td{background-color:#0f0;} table.table1 td.r{background-color:#00f;} Here's the closest I can get: Code:
th{background-color:#f00;} td{background-color:#0f0;} td.r{background-color:#00f;} TH: No BG colour (WRONG) TD.r: Shows blue (correct) That's suggesting that indeed it's ignoring the first type and class part of my CSS identifier and just to add insult to injury, it's ignoring TH. That kind of scuppers my multiple table formatting plans. I've beaten my face against Amazon for MONTHS now and can just BARELY get them to understand that this is a developer question rather than a customer complaint about an eBook that's been purchased. I managed to get to a tech person but now they're crashed in a loop of apologising for the problem and asking me to send my source code. Driving me NUTS! |
09-12-2016, 02:07 PM | #2 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Did you generate an .azk file with Kindle Previewer and sideload it to your iPad? (If you sideload the mobi file generated by Kindle Previewer, the Kindle for iOS app will only show the Mobi7 part.)
|
Advert | |
|
09-13-2016, 04:14 AM | #3 |
Zealot
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
|
Nope. Sent the MOBI to iPad via the "send to kindle" app. Not sure what that then does to the MOBI, but I'd like to think that this would be a good method of getting a close to consumer test of the file.
|
09-13-2016, 04:24 AM | #4 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
For more information on the AZK format see this thread. |
|
09-13-2016, 04:31 AM | #5 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
If, however, you send a "dual Mobi" book to Amazon's Cloud, the iPad will download the KF8 version of the book. Best thing to do is follow Doitsu's advice and use Kindle Previewer to generate an AZK file. Last edited by HarryT; 09-13-2016 at 04:59 AM. |
|
Advert | |
|
09-13-2016, 05:27 AM | #6 |
Zealot
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
|
Aha... this is starting to make a LITTLE sense now, and I'm seeing the dual-format nature of my MOBI too: KindleGen says "Approximate Standard Mobi Deliverable size 712kb, Approximate KF8 Deliverable file size: 741kb" and the resulting MOBI is 1439kb... cool: So it contains BOTH Mobi7 and KF8, which would explain why it looks just fine on Kindle Previewer and some other readers that are able to pull the KF8 out.
SO, you're saying that Kindle for IOS uses the Mobi7 part? (that's pretty cr@ppy tbh) I know about Mobi7 not using CSS, so that kind of makes sense. I guess that then means that unless I change my formatting to be more conducive to the 'best attempts' at putting styling in tags that I'm going to have to forget this looking right on IOS then? (Or wait until they release a major revision) Not over the moon with that, and also not entirely happy that whoever developed the IOS reader has taken that decision. |
09-13-2016, 05:29 AM | #7 |
Zealot
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
|
(Oh, and by the way guys THANKS for helping -I've gotten closer to the cause of this in 24 hours than 6 months of hacking away with Amazon tech team!)
|
09-13-2016, 05:53 AM | #8 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
09-13-2016, 05:54 AM | #9 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Since Kindle for iOS doesn't support AZW3 files Amazon came up with the AZK format, which supports some AZW3 features and mimics the actual file format that Kindle for iOS users get if they buy Amazon books. (For the most part AZK files look like their AZW3 counterparts.) I.e., the book that you tested by sideloading the KindleGen generated mobi file might actually look OK on iPads if bought from Amazon because Kindle for iOS users get the AZK file equivalent. |
|
09-13-2016, 06:13 AM | #10 |
Zealot
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
|
Yep, I'm not sideloading but going through "send to KIndle" - which you're saying results in the KF8 version appearing on the iPad.
.... so that's the explanation of the failure of formatting then? Is it then just down to a bug or omission in the app rather than it picking up Mobi7? Doitsu, you said that Kindle IOS "doesn't fully support KF8". Does anyone know the extent to what they do or don't support? (again, I'd frown at them for seemingly half-doing the job of writing a reader). (yay 100 posts) |
09-13-2016, 07:32 AM | #11 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
You can easily test this yourself with an ePub with media queries for Mobi7 and AZW3. For details see the Kindle Publishing Guidelines. AFAIK, the only way to find out what works and what doesn't is to sideload AZK files. |
|
09-13-2016, 09:08 AM | #12 |
Zealot
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
|
Joy.
Okay, looks like this is going to be a bit of a long haul then. But, as they say what doesn't kill us makes us stronger. I'll add some media query goodness to the standard CSS files while I'm there too. |
09-13-2016, 02:15 PM | #13 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
09-13-2016, 02:22 PM | #14 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
09-13-2016, 03:51 PM | #15 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
Tags |
broken, css, ipad, kindle, table |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fixed spacing in HTML/CSS without tables | ink-sniffer | ePub | 25 | 04-03-2014 03:08 AM |
iPad not honoring CSS | uieluck | ePub | 5 | 03-14-2013 01:53 PM |
KF8 max-width HTML CSS tag broken? | ekovv | Kindle Formats | 5 | 09-05-2012 04:57 AM |
Tables in ePub: CSS | virtual_ink | ePub | 5 | 02-23-2012 02:51 PM |
iBooks/iPad toc.ncx Broken | matthewlhudson | Apple Devices | 0 | 12-30-2010 01:28 PM |