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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-11-2012, 01:55 PM   #1
msmith65
Enthusiast
msmith65 began at the beginning.
 
msmith65's Avatar
 
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?
msmith65 is offline   Reply With Quote
Old 08-11-2012, 02:14 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
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);}
Doitsu is offline   Reply With Quote
Old 08-11-2012, 02:21 PM   #3
msmith65
Enthusiast
msmith65 began at the beginning.
 
msmith65's Avatar
 
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
Quote:
Originally Posted by Doitsu View Post
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);}
Thank you. I tried as you suggested but still no fix. The heading type appears in black.
msmith65 is offline   Reply With Quote
Old 08-11-2012, 02:30 PM   #4
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
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>
Perkin is offline   Reply With Quote
Old 08-11-2012, 02:53 PM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by msmith65 View Post
Thank you. I tried as you suggested but still no fix. The heading type appears in black.
Did you make sure to include a reference to the stylesheet in the header of the .html file?

E.g.

Code:
<head>
  <title></title>
  <link href="../Styles/style001.css" rel="stylesheet" type="text/css" />
</head>
Doitsu is offline   Reply With Quote
Old 08-11-2012, 03:08 PM   #6
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: 29,688
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
theducks is online now   Reply With Quote
Old 08-11-2012, 04:01 PM   #7
unrulyguides
Member
unrulyguides began at the beginning.
 
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
unrulyguides is offline   Reply With Quote
Old 08-12-2012, 10:08 PM   #8
msmith65
Enthusiast
msmith65 began at the beginning.
 
msmith65's Avatar
 
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
Quote:
Originally Posted by Perkin View Post
Works in a quick test. Are your h1's defined in html like :

Code:
<h1 class="style1">Header style1</h1>

Mine look like this:

Code:
<h1 class="style1" id="heading_id_4">How This Book Came to Be</h1>
msmith65 is offline   Reply With Quote
Old 08-12-2012, 10:39 PM   #9
msmith65
Enthusiast
msmith65 began at the beginning.
 
msmith65's Avatar
 
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
Quote:
Originally Posted by theducks View Post
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
Thank you. My stylesheet validates as CSS Level 3.
msmith65 is offline   Reply With Quote
Old 08-12-2012, 10:39 PM   #10
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: 29,688
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:
Originally Posted by msmith65 View Post
Mine look like this:

Code:
<h1 class="style1" id="heading_id_4">How This Book Came to Be</h1>
Sigil inserts the id section(in not existing) if you press the Generate TOC from headers button
If you remove the tick next to a line in the (proposed) TOC generated and save, sigil adds a style SigilNotInTOC
theducks is online now   Reply With Quote
Old 08-12-2012, 11:17 PM   #11
msmith65
Enthusiast
msmith65 began at the beginning.
 
msmith65's Avatar
 
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
Quote:
Originally Posted by Doitsu View Post
Did you make sure to include a reference to the stylesheet in the header of the .html file?

E.g.

Code:
<head>
  <title></title>
  <link href="../Styles/style001.css" rel="stylesheet" type="text/css" />
</head>
Thank you. At your suggestion I made sure I had this on my main content page. It was more or less intact there; I added it to another content page, where it was missing.

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.
msmith65 is offline   Reply With Quote
Old 08-13-2012, 09:52 PM   #12
msmith65
Enthusiast
msmith65 began at the beginning.
 
msmith65's Avatar
 
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
Quote:
Originally Posted by theducks View Post
Sigil inserts the id section(in not existing) if you press the Generate TOC from headers button
If you remove the tick next to a line in the (proposed) TOC generated and save, sigil adds a style SigilNotInTOC
This was a huge help. Thank you.
msmith65 is offline   Reply With Quote
Old 08-15-2012, 05:24 PM   #13
Genarch
Junior Member
Genarch began at the beginning.
 
Posts: 5
Karma: 12
Join Date: May 2011
Device: Pandigital Novel
Quote:
Originally Posted by msmith65 View Post
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?
Remove the space between h1 and .style1 in the CSS
Genarch is offline   Reply With Quote
Old 08-26-2012, 10:19 PM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
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
JSWolf is offline   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
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


All times are GMT -4. The time now is 08:49 AM.


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