11-12-2019, 07:01 PM | #256 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
11-16-2019, 12:47 PM | #257 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Nov 2019
Device: pc
|
Quote:
Finally i took your background image, which is great too. I just modified it a little to simulate a book that suits me better. I put also the croped background i wanted to use initially. And i use this css Code:
body{ margin-top: 0.15em !important; } p{ margin-bottom: 0.3em !important; margin-left: 6.5em !important; margin-right: 6.5em !important; } h2,h3,h4,h5,h6{ margin-left: 4.5em !important; } I hope in a future update we can deal with the body margin, that would solve all these problems Anyway thanks for this great software and thank you Doc for your time responding to me. |
|
Advert | |
|
12-18-2019, 10:20 AM | #258 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Sep 2017
Device: PocketBook
|
It's possible, with the latest release, to customize also the "upper" row (id=book-top-margin)? I tried this, but unsuccessfully:
#book-top-margin {background-color: gray !important; color: rgb(252, 252, 252) !important;} |
12-18-2019, 11:50 AM | #259 |
creator of calibre
Posts: 44,380
Karma: 23764838
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
margins take the same color as whatever backgroud color you have defined in the coor preferences for the viewer.
|
12-20-2019, 03:46 AM | #260 | |
Connoisseur
Posts: 59
Karma: 10
Join Date: Sep 2017
Device: PocketBook
|
Quote:
Yes, but why not let to customer ... customize that colors (with css)? Last edited by duns; 12-20-2019 at 03:51 AM. |
|
Advert | |
|
12-20-2019, 04:14 AM | #261 |
creator of calibre
Posts: 44,380
Karma: 23764838
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Because I dont see the point, why would anyone want margins in a different color from the page? And if you really do, the set the page color to what you want the margins to be and use an image as the page background.
|
12-20-2019, 05:48 AM | #262 | |
Connoisseur
Posts: 59
Karma: 10
Join Date: Sep 2017
Device: PocketBook
|
Quote:
I simply ask you to give the possibility, if a css expert customer wants, to differentiate that background (css ID #book-top-margin). |
|
12-20-2019, 07:51 AM | #263 |
creator of calibre
Posts: 44,380
Karma: 23764838
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That is the top margin, and is it is separated by whitespace from the text of the book, just as in all paper books for instance. You can control how much space there is yby changing the size of the margin.
|
12-20-2019, 12:08 PM | #264 | |
Connoisseur
Posts: 59
Karma: 10
Join Date: Sep 2017
Device: PocketBook
|
Quote:
We are not all "made in the same way" : personally I would prefer to see "author" and "title" and "chapter" with a background that distinguishes it from the body of the text. Is would be technically difficult to let users (with css knowlegde) customize this background? |
|
12-20-2019, 04:41 PM | #265 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Last edited by DoctorOhh; 12-20-2019 at 05:38 PM. |
|
12-21-2019, 04:27 AM | #266 | |
Connoisseur
Posts: 59
Karma: 10
Join Date: Sep 2017
Device: PocketBook
|
Quote:
Today I managed to get something similar (see the image attached), but now Calibre viewer is become very slow... EDIT No: I have changed something and now the speed is normal. This is my css code: Code:
body { counter-reset: section; /* Set a counter named 'section', and its initial value is 0. */ background-image: radial-gradient(white 20%, #e5e4dc 70%) !important; } h2 { counter-reset: paragraph; /* Set a counter named 'section', and its initial value is 0. */ counter-increment: section; /* Increment the value of section counter by 1 */ } p::before { counter-increment: paragraph; /* Increment the value of parag counter by 1 */ content: "[cap." counter(section) ", para." counter(paragraph) "] "; color: gray; font-size: 70%; } h2 {background: #B35A31 linear-gradient(to left, #B35A31 80%, #F4E492 105%); color: white !important; font-weight: bold !important; text-shadow: gray -1px -1px; border-radius: 8px; box-shadow: 5px 4px 4px gray; margin-bottom: 25px !important;} h3, h4 {color: #B35A31 !important; border-bottom: thin white solid;} div {max-width: 90vw !important; margin-left: auto; margin-right: auto;} Last edited by duns; 12-21-2019 at 05:30 AM. |
|
12-21-2019, 05:28 AM | #267 |
creator of calibre
Posts: 44,380
Karma: 23764838
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
What size image are you using for the background?
|
12-21-2019, 06:39 AM | #268 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Sep 2017
Device: PocketBook
|
|
12-29-2019, 10:38 PM | #269 |
Guru
Posts: 750
Karma: 308700
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
|
12-30-2019, 03:46 AM | #270 |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
No special code. I described how I set things up in post 246. But I attached the adjustments I entered in Viewer - Preferences to get this look. Essentially no margins left, right or bottom. Change the color so the background and fore a different then add code in style to change the book text color back to black.
In calibre preferences I did create a Save to Disk metadata plugboard (see attached) to save the Author - Title to the title field upon using the Save to Disk feature to get the Author and title to display where only the Title would normally appear. This means I would have to use the Save to Disk feature to save the book into a reading directory before I read the book. This was just an exercise to show what could be done with existing settings. I use the setup in post 246 myself. Last edited by DoctorOhh; 12-30-2019 at 04:36 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom CSS for output | deckoff | Calibre | 1 | 08-28-2010 11:55 PM |
ePub with custom .css on a 505 | dicknskip | Sony Reader Dev Corner | 3 | 06-09-2010 11:34 PM |
User stylesheets for ePub files | salty-horse | Sony Reader Dev Corner | 12 | 02-23-2010 07:44 AM |
ePub conversion: override existing css with a custom one | sbin | Calibre | 1 | 01-09-2010 04:03 AM |
Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 09:59 AM |