09-15-2021, 03:26 PM | #1 |
Connoisseur
Posts: 66
Karma: 10
Join Date: Nov 2012
Device: none
|
Coverpage Background Color
I'm new to the calibre epub viewer.
Why doesn't the code below create the coverpage background color in the calibre epub viewer (ver 5.27)? *** <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"> <head> <title>Cover</title> </head> <body style="text-align: center; padding: 0pt; margin: 0pt;"> <div style="background-color: #090909;"> <img alt="cover" src="../Images/cover.jpeg"/> </div> </body> </html> *** I see the color section of Preferences might be used, but I only want the background to apply to the cover. Linking to a stylesheet doesn't appear to work either. The background remains White. Thanks for your help. |
09-15-2021, 03:44 PM | #2 |
Well trained by Cats
Posts: 29,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
In The VIEWER: Preferences: Colors: Override: NEVER
might work |
09-15-2021, 05:09 PM | #3 |
Connoisseur
Posts: 66
Karma: 10
Join Date: Nov 2012
Device: none
|
Thanks, Ducks...
But NEVER is already set. I tried the other choices too, and no dice. Moreover, background-color works in both Sigil and Adobe DE. |
09-15-2021, 11:50 PM | #4 |
creator of calibre
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
IIRC, with epub the viewer doesnt use the titlepage markup at all, it generates its own, when it detects that the cover is a simple image. This is done because lots of books have broken title page markup that doesnt work well.
So you cannot control the presentation of the cover image in the viewer from the book's markup. |
09-16-2021, 03:24 PM | #5 |
Connoisseur
Posts: 66
Karma: 10
Join Date: Nov 2012
Device: none
|
Thanks for the answer. Can the cover image presentation be controlled elsewhere in Calibre?
|
09-16-2021, 09:38 PM | #6 |
creator of calibre
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sure you can modify calibre source code, but there is no setting for it other than the one to preserve cover aspect ratio under Page Layout in the viewer settings.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
css background-color: | jwilson5153 | Conversion | 1 | 07-18-2019 11:16 PM |
Force a background color with Kindle app color modes? | ptmkenny | Kindle Formats | 2 | 05-25-2018 09:36 PM |
Changing font color OR background color for an entry | dkperez | Library Management | 2 | 06-29-2015 11:50 PM |
Text color and background color almost the same | larrymohr | Kobo Tablets | 2 | 11-20-2011 06:59 PM |
Background color | marcelo2605 | Sigil | 7 | 04-05-2011 05:51 PM |