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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-11-2019, 10:02 AM   #1
codys
Junior Member
codys began at the beginning.
 
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.
codys is offline   Reply With Quote
Old 07-11-2019, 01:13 PM   #2
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
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.
lumpynose is offline   Reply With Quote
Advert
Old 07-11-2019, 02:49 PM   #3
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by lumpynose View Post
Dummy here; how do you open an epub in GPB? I think I tried with one in the Downloads folder but didn't succeed.
You have to upload the ebook to Play Books before you can open it in the app.

It is weird, yes.
Nate the great is offline   Reply With Quote
Old 07-11-2019, 03:39 PM   #4
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Thanks. It took several minutes to process a short book, The Pilgrim's Progress in Words of One Syllable, by Lucy Aikin (& John Bunyan), which is about 100k.

Quote:
Originally Posted by Nate the great View Post
It is weird, yes.
Well, it is google.

It's nice to have another platform to test on.
lumpynose is offline   Reply With Quote
Old 07-13-2019, 01:51 AM   #5
graycyn
Wizard
graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.
 
Posts: 1,482
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Kindle Oasis 2, Sony PRS-T2
Quote:
Originally Posted by codys View Post
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.

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
graycyn is offline   Reply With Quote
Advert
Old 07-13-2019, 12:52 PM   #6
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
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:
Originally Posted by codys View Post
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.
codys:

How are you centering that text that is not rendering correctly, please?

Hitch
Hitch is offline   Reply With Quote
Old 07-19-2019, 12:20 PM   #7
codys
Junior Member
codys began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Oct 2018
Device: Kindle Paperwhite
Quote:
Originally Posted by Hitch View Post
codys:

How are you centering that text that is not rendering correctly, please?

Hitch
Hi Hitch.

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>

...
From stylesheet.css

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

...
Entirety of page_styles.css:

Code:
@page {
    margin-bottom: 5pt;
    margin-top: 5pt
    }

This is how it looks:

codys is offline   Reply With Quote
Old 07-19-2019, 01:31 PM   #8
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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.
DNSB is offline   Reply With Quote
Old 07-19-2019, 09:47 PM   #9
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
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:
Originally Posted by codys View Post
Hi Hitch.

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>

...
From stylesheet.css

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

...
Entirety of page_styles.css:

Code:
@page {
    margin-bottom: 5pt;
    margin-top: 5pt
    }

This is how it looks:


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
Hitch is offline   Reply With Quote
Reply

Tags
calibre, css, epub, gpb

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 03:55 AM.


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