![]() |
#1 |
Ebook reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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; } |
![]() |
![]() |
![]() |
#4 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,155
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
a { color : black; cursor : pointer; text-decoration : none; } |
|
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
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.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,155
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
a { color : black; cursor : pointer; text-decoration : underline; } |
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#8 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
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.
|
![]() |
![]() |
![]() |
#9 |
Ebook reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |