Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 11-12-2019, 10:41 AM   #1
Ned
Ebook reader
Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.
 
Ned's Avatar
 
Posts: 389
Karma: 5899335
Join Date: Oct 2008
Location: York, England
Device: Kobo Aura H2O (ed 2, v1), Kobo Forma, Kobo Libra 2
Kobo stylesheet problem

Hello, I wonder if somebody could help please.

I'm using the following standard stylesheet on my Kobo Aura H20

body {color:black;
background-color:rgb(255,255,255);
text-align:justify;
line-height:1.2;
font-family: “Bookerly”;
font-weight: normal;
font-style: normal;
margin-top:1em;
margin-bottom:1em;
padding:0;
margin-right:1em;
margin-left:1em;
text-indent:2em;}
p {margin: 0;
padding: 0;}

h1, h2, h3, h4, h5, h6
{color:black;
font-size: 20px;
font-family: "Bookerly";
text-align:center;
font-style:normal;
font-weight:bold;}

and it renders the headings the right size, but in grey rather than in black as should be shown below.

https://i.imgur.com/YzBx3Ra.jpg
Does anybody know how I can turn the headings to black please?

Last edited by Ned; 11-12-2019 at 01:11 PM. Reason: remove oversize image
Ned is offline   Reply With Quote
Old 11-12-2019, 11:14 AM   #2
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,274
Karma: 5935030
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
You can specify a color for links in headers;

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {color: black}

Just as well you didn't get the right link for IMG tags. The moderators would have slapped you with a wet trout for not shrinking the image as per the guidelines (posted here somewhere.)... But in case you do create an image you want to post here in the future, rather than use the links Imgur suggests, open the image in Imgur, and right click on the picture to "Copy Image Location" (in firefox,, other browsers will have their own way to find this information, but who cares about other browsers?)

Last edited by rashkae; 11-12-2019 at 11:19 AM.
rashkae is offline   Reply With Quote
Advert
Old 11-12-2019, 12:11 PM   #3
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: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Nd, if you are linking the headers back to the ToC, stop it.

Linking headers back the the Toc is very poor form. The thing is, it doesn't need to be done as there is a proper ToC accessible with two taps. And it look awful. It looks cheap and tacky.

And how are you making your CSS? It looks awful. It's got too much stuff that really needs to go.

Code:
a {
  color: black;
}
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
h1, h2, h3, h4, h5, h6 {
  font-size: 20px;
  text-align:center;
}
JSWolf is online now   Reply With Quote
Old 11-12-2019, 11:10 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,155
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Ned View Post
Hello, I wonder if somebody could help please.

I'm using the following standard stylesheet on my Kobo Aura H20

and it renders the headings the right size, but in grey rather than in black as should be shown below.

https://i.imgur.com/YzBx3Ra.jpg
Does anybody know how I can turn the headings to black please?
You are linking your headers and have not specified the link style? You might want to add a class to be used with the <a> tags such as

Code:
a {
    color : black;
    cursor : pointer;
    text-decoration : none;
}
DNSB is offline   Reply With Quote
Old 11-13-2019, 05:49 AM   #5
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: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
You are linking your headers and have not specified the link style? You might want to add a class to be used with the <a> tags such as

Code:
a {
    color : black;
    cursor : pointer;
    text-decoration : none;
}
But if you remove the underline and change the color to black, you won't see the links. Dump the test-decoration or leave it as gray text.
JSWolf is online now   Reply With Quote
Advert
Old 11-13-2019, 12:26 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,155
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
But if you remove the underline and change the color to black, you won't see the links. Dump the test-decoration or leave it as gray text.
I'm leaving it up to the OP as to what he wants. Personally, I think linking the chapter header is pretty much a useless idea and he should remove the links making this whole discussion moot.

Code:
a {
    color : black;
    cursor : pointer;
    text-decoration : underline;
}
DNSB is offline   Reply With Quote
Old 11-13-2019, 03:48 PM   #7
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,274
Karma: 5935030
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
If using the code I posted in the first reply, it would make the headings dark, (was requested) without removing the styling from any other links that might (or might not) be present in the text.
rashkae is offline   Reply With Quote
Old 11-13-2019, 09:17 PM   #8
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: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
I'm leaving it up to the OP as to what he wants. Personally, I think linking the chapter header is pretty much a useless idea and he should remove the links making this whole discussion moot.

Code:
a {
    color : black;
    cursor : pointer;
    text-decoration : underline;
}
I do agree that linking a chapter header is useless and should be removed. But the other thing is that the CSS code is awful and if he's using some program to generate this CSS, he either needs to stop using that program or learn how to clean up the CSS. I've posted the CSS cleaned up. But for the rest of the eBook, it will be a real mess.
JSWolf is online now   Reply With Quote
Old 11-14-2019, 06:29 AM   #9
Ned
Ebook reader
Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.
 
Ned's Avatar
 
Posts: 389
Karma: 5899335
Join Date: Oct 2008
Location: York, England
Device: Kobo Aura H2O (ed 2, v1), Kobo Forma, Kobo Libra 2
Thank you for all your help and advice guys.
It's helped a lot.

Let me explain the history of my CSS.

The CSS was given to me by a friend :
I'd decided how I wanted every book to appear (I don't read technical stuff with precise formatting) and set up my reader accordingly, but had found too many ebooks imposing on me fonts, sizes and spacings I didn't like, or even font sizes that were too small for me to read. No idea why they do this, when all I want is the words.

Anyway, I found that in most cases, deleting the stylesheets in Calibre did the job, so I started doing that. (I stopped writing programs in the 70s and didn't really want to start again if I could avoid it)
My friend suggested that it might be better to replace the stylesheet with a simple standard one to give the desired result, and kindly gave me that one.

I've used it since then with no ill effects and was grateful to have it.
The appearance of those particular headings in grey (blue on a color monitor) was a very minor irritant, that I thought might be cured by amendments to that CSS.

I checked and as you've pointed out, the book for some reason uses links for those headings, so now I know what's going on there too.

Thanks again, your advice is much appreciated
Ned is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems editing Stylesheet - no stylesheet window-appaer Divi filius Sigil 2 07-26-2019 03:30 PM
Internal Basic Stylesheet of the Kobo Software? ibu Kobo Reader 15 03-09-2017 12:00 PM
Changing fonts issue on Kobo Aura HD/Kobo Glo [PROBLEM SOLVED] Dr. Drib Kobo Reader 19 05-13-2014 04:35 PM
PDF to HTMLZ conversion stylesheet problem Sneddles Calibre 2 05-24-2012 12:54 AM
EPub conversion stylesheet.css problem nycaleksey Calibre 1 03-25-2010 11:42 PM


All times are GMT -4. The time now is 05:42 AM.


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