04-29-2012, 10:32 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: All
|
CSS classes on Android epub readers
I'm trying to colour headings in my epub, but on every Android reader I have installed on my Galaxy 7.7, the class settings are ignored. I can colour using span tags, or back grounds in tables but nothing else at all. As I am new to CSS is there something I am doing wrong? It looks fine in Sigil....
I'm making the pages in Dreamweaver.... |
04-30-2012, 07:11 AM | #2 | |
Jr. - Junior Member
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
Quote:
https://www.mobileread.com/forums/forumdisplay.php?f=203 Regards - John |
|
Advert | |
|
04-30-2012, 10:13 AM | #3 | |
Well trained by Cats
Posts: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
You said Colored Spans work? Does a construct like <h3 class="my1"><span class="my2">Text</span></h3> work for color? .my1 {display: block; text-align: center;} .my2 {color: red;} |
|
04-30-2012, 07:52 PM | #4 | |
Resident Curmudgeon
Posts: 73,866
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
05-04-2012, 07:03 PM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: All
|
The problem was me - I have made some progress by starting my CSS again - now getting some colour in text and table backgrounds using classes but finding it frustrating that apps read the code differently. EG FB reader does not show my sans serif font (or any sans serif font) and the others do, a link to another page attached to a graphic sometimes works and sometimes does not, and in IBooks display=inline block is ignored. Even photos are split across screens. My client is reluctant to specify a platform so I guess they will have to live with the differences in appearance between reader apps. (We are looking at Androids or Ipods mostly - Nooks and Kindle Fire are not available here)
Can anyone suggest how to hide a number of pages (chapter) from appearing in the TOC or navigation options? I have tried setting the spine settings to linear = NO whereupon other pages are not available. Also cannot get anchors to work reliably in anything (Mantano, FB Reader, Galaxy Ebook, Ibooks)... |
Advert | |
|
05-05-2012, 04:22 AM | #6 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Fonts, unless they are embedded in the ebook, could or could not work in any reader, it depends on what they have predefined. "inline block" is not an officially supported value for ePub 2.
To hide things from the TOC, just remove them from the TOC. The TOC should be an NCX file which you can edit. What doesn't work with anchors? I've never had a problem with them (except with pictures as links). |
05-05-2012, 05:57 AM | #7 | |
Guru
Posts: 932
Karma: 15752887
Join Date: Mar 2011
Location: Norway
Device: Ipad, kindle paperwhite
|
You could try to use this css property on a div containing the image:
page-break-inside:avoid !important; Quote:
"Hidden" chapters I usually move to the end of the book, and make links to move between the chapters. The linear-property is the correct way of hiding stuff inside your book, bot the property is not honoured by the rendering machines Last edited by Iznogood; 05-05-2012 at 06:10 AM. |
|
05-13-2012, 04:57 PM | #8 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: All
|
Thank you for your comments - working on it
|
Tags |
android, css, epub |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why, During ePub to ePub Conversion does Calibre changes existing CSS classes? | JSWolf | Conversion | 7 | 08-06-2011 07:32 PM |
Calibre Inserting Its Own CSS Classes | Xopher H | Conversion | 2 | 08-02-2011 10:21 PM |
Any students using electronic readers for classes? | jbcohen | General Discussions | 63 | 03-16-2011 10:06 AM |
Classes in CSS in recipes? | Tegan | Recipes | 10 | 01-17-2011 07:30 PM |
NCX creation -- nested or not, css classes | illustrata | ePub | 3 | 08-25-2010 08:56 AM |