07-11-2019, 10:02 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2018
Device: Kindle Paperwhite
|
CSS in Google Play Books vs Nook and others
I'm testing some epubs in GPB and Nook, and some of the basic CSS is rendering fine in Nook but not GPB. Specifically, text-align:center is being ignored in GBP (there's probably more, but that's the most obvious).
I'm still somewhat new to all of this, and the posts complaining about GPB and CSS were back from 2014. So is GPB still crummy with respect to CSS? Or is there something else I should be doing? BTW, I'm using Calibre. |
07-11-2019, 01:13 PM | #2 |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
Dummy here; how do you open an epub in GPB? I think I tried with one in the Downloads folder but didn't succeed.
|
Advert | |
|
07-11-2019, 02:49 PM | #3 |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
|
07-11-2019, 03:39 PM | #4 |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
|
07-13-2019, 01:51 AM | #5 | |
Wizard
Posts: 1,482
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Kindle Oasis 2, Sony PRS-T2
|
Quote:
As far as I have seen, Google Play Books renders text-align: center correctly. I've so far been completely happy with the way my books appear in Play Books. About the only thing I've noticed that isn't as I intend is that TOC links are bright blue. Clearly there's a CSS override there, but no biggie. Sent from my iPad using Tapatalk |
|
Advert | |
|
07-13-2019, 12:52 PM | #6 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
How are you centering that text that is not rendering correctly, please? Hitch |
|
07-19-2019, 12:20 PM | #7 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2018
Device: Kindle Paperwhite
|
Quote:
Here is an example: From the text: Code:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Lorem Ipsum</title> <link href="stylesheet.css" rel="stylesheet" type="text/css"/> <link href="page_styles.css" rel="stylesheet" type="text/css"/> </head> <body class="calibre"> <h3 class="block_3" id="toc_id_87">Introduction</h3> ... Code:
... .block_3 { display: block; line-height: 1.2; text-align: center; font-size: 1.0em; font-weight: normal; text-decoration: underline; margin: 12pt 0 3pt; padding: 0 } ... .calibre { color: #000; display: block; font-family: "Times New Roman", serif; font-size: 1em; line-height: 1.2; padding-left: 0; padding-right: 0; margin: 0 5pt ... Code:
@page { margin-bottom: 5pt; margin-top: 5pt } This is how it looks: |
|
07-19-2019, 01:31 PM | #8 |
Bibliophagist
Posts: 34,557
Karma: 144552660
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
How does your stylesheet fare when checked with the W3C stylesheet validator? I don't remember the calibre editor having the ability to validate stylesheets so you may have to upload the stylesheet to W3C CSS Validation Service.
|
07-19-2019, 09:47 PM | #9 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Well, the thing is, with CSS...you have that whole pesky inheritance thing. do you have any paragraph styles or heading styles that are upstream of that? What are your style classes for your h, h1-h6 classes? Hitch |
|
Tags |
calibre, css, epub, gpb |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Upload Kindle or Nook books to Google Play? | Inspirement | Android Devices | 6 | 07-25-2014 02:46 PM |
Epub3 CSS not implemented on Google Play Books | leijoninna | ePub | 0 | 04-11-2014 08:45 AM |
international users - google play in Nook HD | misctalk | Barnes & Noble NOOK | 5 | 06-20-2013 09:53 AM |
Nook HD+ gets Google Play | mgmueller | Barnes & Noble NOOK | 2 | 05-12-2013 05:16 PM |
Nook opens up adds Google Play | Jabby | Android Devices | 2 | 05-06-2013 12:38 PM |