![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2019
Device: Kindle PW3
|
![]()
The "Styles" page of the viewer preferences mentions there are custom classes for different flow modes, e.g. body.calibre-viewer-paginated and body.calibre-viewer-scrolling. Are there specific classes or ids associated with the headers and footers? I would love to be able to style them specifically, although setting a minimum font size in preferences did fix my main complaint, which is that they were microscopically small on my laptop. I tried looking on github to see how the viewer constructs things, but although I saw references to e.g. something that looked like it could be a 'book-side-margin' class, I couldn't get that to do anything.
After I experimentally tried overriding all text and background colors, I suspect the style sheet may simply not apply to the headers and footers, which might explain why they're in a sans-serif font despite my preference saying to use serif font. Although at least the background/foreground color respects my custom color preferences. Code:
* { color: black !important; background-color: white !important; border-style: dotted !important; } |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,154
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The stylesheet does not apply to headers and footers, only to book content. Headers and footers are shown in the UI font, not the book text font, since that would be pretty confusing.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2019
Device: Kindle PW3
|
I guess that makes sense. In my mental model, I was thinking of the header and footer as belonging to the book, like a page number or chapter title that's on each written page, so I expected to be able to style it like I was styling the rest of the page. Don't get me wrong, I like the fact that the header and footer apply my custom background and foreground color--it would be rather jarring to have them in a totally different brightness level, the way the toolbar is--but I think that contributed to my confusion. Thanks for explaining!
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,154
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Indeed in an ebook unlike a pbook headers and footers belong to the reader not the author
![]() |
![]() |
![]() |
![]() |
Tags |
css, footer, header, stylesheet |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sage Header and Footer space | mcp000 | Kobo Reader | 10 | 09-08-2022 04:37 PM |
Footer or Header? | shore_pk | Sigil | 10 | 04-23-2021 11:43 AM |
How to add a header/footer | Arkadian | Editor | 7 | 09-24-2014 02:28 PM |
Header and Footer in EPUB | Raja1205 | ePub | 7 | 08-29-2012 02:36 AM |
Header/Footer removal | Solicitous | Calibre | 2 | 03-30-2010 05:53 AM |