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

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 09-15-2021, 03:26 PM   #1
pete6055
Connoisseur
pete6055 began at the beginning.
 
Posts: 61
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.
pete6055 is offline   Reply With Quote
Old 09-15-2021, 03:44 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 26,669
Karma: 41845871
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
In The VIEWER: Preferences: Colors: Override: NEVER
might work
theducks is offline   Reply With Quote
Old 09-15-2021, 05:09 PM   #3
pete6055
Connoisseur
pete6055 began at the beginning.
 
Posts: 61
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.
pete6055 is offline   Reply With Quote
Old 09-15-2021, 11:50 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 39,814
Karma: 17764952
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.
kovidgoyal is online now   Reply With Quote
Old 09-16-2021, 03:24 PM   #5
pete6055
Connoisseur
pete6055 began at the beginning.
 
Posts: 61
Karma: 10
Join Date: Nov 2012
Device: none
Thanks for the answer. Can the cover image presentation be controlled elsewhere in Calibre?
pete6055 is offline   Reply With Quote
Old 09-16-2021, 09:38 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 39,814
Karma: 17764952
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.
kovidgoyal is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 02:57 AM.


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