08-11-2012, 01:55 PM | #1 |
Enthusiast
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
|
H1, H2, H3 Color Not Showing Up
I have a pretty good-looking book set up in Sigil, with one exception: The author's desire for the headings to appear in a different color isn't translating in the code I've set up.
Here's one of the headings that isn't showing up in color: <h1 id="heading_id_2">Table of Contents</h1> <h1 class="style1" id="heading_id_4">How This Book Came to Be</h1> And here's the relevant portion of the CSS: h1 .style1 {font-family:"Bookman Old Style";text-align:left;color:rgb(50, 158, 255;} h2 .style1 {font-family:"Bookman Old Style";text-align:left;color:rgb(50, 158, 255;} h3 .style1 {font-family:"Bookman Old Style";text-align:left;color:rgb(50, 158, 255;} (I tried that with and without the ".style1" and with hex code instead of RGB; no difference. There is only one heading style in use in this document.) I was (inadvertently) successfull with one <span> tag that appeared in the HTML file, and I think it came over with the file from editing in Sharepoint. Anyway, I deleted the <span> tag because I figured there had to be an easier way to color all the headings. Ideas? |
08-11-2012, 02:14 PM | #2 |
Grand Sorcerer
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Your style definition contains some typos. There's a space between h1. and the rest. You're also missing the closing parenthesis after the color values. Try the following:
h1.style1 {font-family:"Bookman Old Style";text-align:left;color:rgb(50, 158, 255);} |
08-11-2012, 02:21 PM | #3 |
Enthusiast
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
|
Thank you. I tried as you suggested but still no fix. The heading type appears in black.
|
08-11-2012, 02:30 PM | #4 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Works in a quick test. Are your h1's defined in html like :
Code:
<h1 class="style1">Header style1</h1> |
08-11-2012, 02:53 PM | #5 | |
Grand Sorcerer
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
E.g. Code:
<head> <title></title> <link href="../Styles/style001.css" rel="stylesheet" type="text/css" /> </head> |
|
08-11-2012, 03:08 PM | #6 |
Well trained by Cats
Posts: 29,691
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Validate your stylesheet
Stylesheets (or sections) get ignored in many cases when they contain syntax errors (logic errors may pass: margin-left: 100em; )
Use the W3C CSS validation service |
08-11-2012, 04:01 PM | #7 |
Member
Posts: 10
Karma: 12
Join Date: May 2011
Device: Kindle
|
remove the space between the (eg) h1 and .style
Should be like one-word: h1.style h1.style1 {font-family:"Bookman Old Style";text-align:left;color:rgb(50, 158, 255);} h2.style1 {font-family:"Bookman Old Style";text-align:left;color:rgb(50, 158, 255);} h3.style1 {font-family:"Bookman Old Style";text-align:left;color:rgb(50, 158, 255);} And the HTML would be (eg) <h1 class="style1">Heading 1</h1> = = = = Unruly Guides First Steps Publishing |
08-12-2012, 10:08 PM | #8 |
Enthusiast
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
|
|
08-12-2012, 10:39 PM | #9 |
Enthusiast
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
|
|
08-12-2012, 10:39 PM | #10 | |
Well trained by Cats
Posts: 29,691
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
If you remove the tick next to a line in the (proposed) TOC generated and save, sigil adds a style SigilNotInTOC |
|
08-12-2012, 11:17 PM | #11 | |
Enthusiast
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
|
Quote:
Nothing seemed to work until I modified all the HTML header codes in the main document to include the "style1" reference. Strangely, it was already in several of them. But not until all of them had it, did the colors start to work. Thank you, each of you, for helping to solve this. |
|
08-13-2012, 09:52 PM | #12 |
Enthusiast
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
|
|
08-15-2012, 05:24 PM | #13 | |
Junior Member
Posts: 5
Karma: 12
Join Date: May 2011
Device: Pandigital Novel
|
Quote:
|
|
08-26-2012, 10:19 PM | #14 |
Resident Curmudgeon
Posts: 73,668
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It's been discovered in the thread (linked below) that msmith65 is asking for help at MR because he's been tasked with creating an eBook for a client. He's being paid to do this and he has no clue what he is doing. He is using MR to learn so he can get paid. He's using us for free help without bothering to go learn what to do. He bungles the code, asks us what to do to put it right and gets paid for it. I for one will not be helping msmith65 do his job.
https://www.mobileread.com/forums/sho...d.php?t=188864 |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Color eInk. Jetbook Color Available for Pre Order | X read X | News | 37 | 12-09-2011 01:57 PM |
Nook Color not showing cover art thumbnails | leday | Devices | 4 | 03-28-2011 12:54 AM |
Calibre not showing Nook Color library | KatBader | Devices | 3 | 01-28-2011 03:47 PM |
Lifehacker.com showing how to root a nook color | Mitzasuro | Nook Developer's Corner | 3 | 12-30-2010 01:21 AM |