![]() |
#1 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jan 2017
Location: West of Fort Worth, TX
Device: Kindle Fire 7, 2015, Fire HD 8 2021
|
Trouble getting background color change to display properly
Hi. I've got one index section on a book that I want to change to a solid black color with white letters. In the edit screen the file preview shows perfect. When sending to a Kindle Fire or using the caliber book View button, it shows blocks of black with white letters, but still a white background. I'd appreciate any help in how to get this to show the way I want it to work. Included is a screen shot of what it looks like. The file preview in edit mode is on the right and looks perfect. The book view from the main Caliber page is superimposed on the edit screen just to the left.
Thanks for any help you can offer. Last edited by Coolmeadow Kid; 07-22-2022 at 05:14 PM. |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 62
Karma: 221034
Join Date: May 2021
Device: None
|
What is your background and text color code?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jan 2017
Location: West of Fort Worth, TX
Device: Kindle Fire 7, 2015, Fire HD 8 2021
|
If I'm looking at the right things, the black background is #000000 and the white text is ffffff. Just the basic colors in the drop down color menus on the HTML edit window. If this isn't what you're looking for, let me know where to find it. FYI, I don't understand HTML language. In 11 books in this series, I have recognized the HTML Calibre creates when the program converts from docx to epub and copy and paste the specific strings to get the desired effect. So it's all on recognition and none on understanding! I know that may not help you to help me, but it's all I know to do at my age. Thanks for your willingness to try to help!!
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jan 2017
Location: West of Fort Worth, TX
Device: Kindle Fire 7, 2015, Fire HD 8 2021
|
Honestly, this was done 4 years ago and I don't remember. Plus that computer bit the dust 3 years ago, so I lost any notes I might have had on what I did. I know I tried multiple things I found on internet searches over a week or two. I was elated when this one showed the desired outcome on the File preview side of the epub edit page. When I loaded the book on my Kindle Fire and read the book that way looking for errors to fix, I noticed it didn't display the total black page like it does on the file preview screen showed. I never had any luck finding a fix for it, so chalked it up to one of those things that would just stay a mystery. I think I even posted a question on this forum but didn't get any help. Sorry I'm no help to clarify things for you. Thanks!
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 62
Karma: 221034
Join Date: May 2021
Device: None
|
As in your screenshot in the background, you obviously have the code in that book. Can you post the code for the colors from that book here in the thread?
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jan 2017
Location: West of Fort Worth, TX
Device: Kindle Fire 7, 2015, Fire HD 8 2021
|
Hopefully this the part you are asking for. If not, please let me know where to find what you need. Thanks again! Jim.
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlu0003alang="en" xmlU0003Alang="en"> <head> <title>Unknown</title> <link href="stylesheet.css" rel="stylesheet" type="text/css"/> <link href="page_styles.css" rel="stylesheet" type="text/css"/> </head> <body class="calibre11"> <p class="block_5">*</p> <p class="block_5">*</p> <span class="calibre3">The next thing I know, I am in a room, sitting by someone. It is dark in here, but everyone has enough of a glow around them that I can see a little. Though everything is a little fuzzy. Must be my eyes from being in the dark. I wonder how long I have been this way. |
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 62
Karma: 221034
Join Date: May 2021
Device: None
|
Not quite, it doesn't show the actual colors code. Open the CSS file and post that code.
|
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,944
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
actually, that is faulty code
<span> is not supposed to be standalone, but always contained within a block level tag. p, div, h# ... If you had run the debug tool, it should have been complaining ![]() <p class="calibrewhatever"><span class="calibre3"> RMSDK is notorious for tossing out the CSS if it encounters bad code |
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 62
Karma: 221034
Join Date: May 2021
Device: None
|
Oh, yeah... Missed that. *d'oh!* But still, it would help to see the color code as well, just in case there's an error in that somewhere, too.
|
![]() |
![]() |
![]() |
#11 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,944
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It would also help if the description of the result desired was more specific. Paragraph? Just a block? so we know where to apply the styles AND what is the target reading device (we all know how much fun it is to get universal code to work ![]() |
|
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jan 2017
Location: West of Fort Worth, TX
Device: Kindle Fire 7, 2015, Fire HD 8 2021
|
OK, I think....I'll also run the debug tool and see if it shows anything. If so I'll copy and post that.
Spoiler:
Last edited by theducks; 07-23-2022 at 01:44 PM. Reason: spoilered |
![]() |
![]() |
![]() |
#13 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jan 2017
Location: West of Fort Worth, TX
Device: Kindle Fire 7, 2015, Fire HD 8 2021
|
I get a lot of these in the left screen when I click the debug link: Link points to a location not present in the target file****[toc.ncx]
then one of these in the right screen: Warning [1 / 57] toc.ncx (line: 30) The link "None" points to a location toc_id_25 in the file index_split_001.html that does not exist. You should either remove the location so that the link points to the top of the file, or change the link to point to the correct location. Try to correct all fixable errors automatically I clicked the link to try to correct all fixable errors automatically but it still shows all the same bugs. But I don't understand how to 'correct the links pointing to a location not in the target file'. And I'm quickly starting to understand that this is WAY beyond my ability to fix or even comprehend!!! (where are the smiley faces when I need them!!) Last edited by Coolmeadow Kid; 07-23-2022 at 12:55 PM. |
![]() |
![]() |
![]() |
#14 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,448
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#15 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 62
Karma: 221034
Join Date: May 2021
Device: None
|
IMO, there are way too many styles that have differing elements. Some have the color codes as names and others as hex, for starters. Some don't even have the colors at all. Then there is the absolute abundance of block styles in general.
You would just need one single style to make your background black and the text white. Such as: body { background-color: black; color: white; } That would apply the background and text colors to all the pages all at once as it uses the main body tag to implement that. Then you should clean up all the styles to combine like ones together, such as: .block_6 { display: block; line-height: 1.2; text-align: left; margin: 0; padding: 0; } .block_16 { background-color: #FFF; color: black; display: block; line-height: 1.2; text-align: left; margin: 0; padding: 0; } Notice the only difference are the color lines. You can remove that and combine those two into a single style. Just make sure to change your references throughout the book. Then just continue cleaning up the styles until it's clean with only a few styles instead of *gestures to all* all that garbage. Last edited by Foozle; 07-23-2022 at 05:35 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I change background color? | AxaRu | Sigil | 5 | 02-11-2022 10:25 AM |
How to css change background color of an epub? | alegriadelarte | Editor | 1 | 05-15-2018 03:37 PM |
change background color? | suniram | Calibre | 8 | 05-26-2016 01:17 PM |
Altering HTML Script To Properly Display Background Images In ADE Ereaders. | Turk.Turkleton | Sigil | 16 | 09-25-2012 12:34 PM |
Change Link2SD background color | giosa | Sony Reader Dev Corner | 0 | 03-01-2012 06:33 PM |