05-11-2019, 01:36 PM | #31 |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
|
05-12-2019, 05:07 PM | #32 |
Junior Member
Posts: 5
Karma: 10
Join Date: Apr 2019
Device: Onyx Boox Nova Pro
|
Any HTML to get rid of the Upper and Lower margins as well ?
Tried this but didn't work: html { margin-bottom: -60pt; margin-top: -60pt } |
05-12-2019, 11:06 PM | #33 |
just an egg
Posts: 1,599
Karma: 4798866
Join Date: Mar 2015
Device: Kindle, iOS
|
I think top margin is fixed. Bottom margin depends a lot on font, font-size and line-height — i.e., how many lines can fit on a screen depends on font, font-size and line-height. If you play with those settings, you'll see that the size of the bottom margin changes.
|
05-13-2019, 12:06 AM | #34 | |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
Quote:
body { blah; blah; blah; } And make sure you're putting it at the bottom of the last css file linked to in the html files. |
|
05-13-2019, 03:22 PM | #35 |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
After I posted the above I was thinking about my suggestion of using the body versus html tag for styling and when I made the post my reasoning was that you don't (can't?) put text between the html and /html tags. What does go between them are the head and body tags, see the w3c page https://tinyurl.com/y2lew3je. Given that lots of people use styling attached to the html tag I'll assume that the css does propagate down to the body tag.
Then I started thinking about that propagation and if it could be useful and I remembered the footer tag and was thinking that perhaps it goes after the body tag, within the html tag. Nope, the footer tag goes within the body tags. So I stand by what I said about it making more sense to use the styling on the body tag. Although now I'm wondering what happens if you use styling on the html tag (at the bottom of the last css file) in an effort to mitigate objectionable styling used by the author, e.g., if they put theirs on the body tag. I would like to come up with a minimal recipe for repairing objectionable styling, and have the recipe work on all books. But I'm hot getting my hopes up for that last part. Edit: I've struck out lots of malarky because I was confused about margins being inherited, but they're not. Although I still think it makes better sense to set the margin on the body and not the html. Last edited by lumpynose; 05-14-2019 at 01:36 AM. |
05-14-2019, 07:01 PM | #36 |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
After my confusion yesterday about inheritance I did some reading on that and also did some experimentation.
With the Kindle Oasis I could only get the margins reduced by adding some css to the html tag, not the body tag. I only needed -1em to get it fairly close; -2em went too far. So at the bottom of the last linked css file I had Code:
html { margin-left: -1em; } |
05-16-2019, 03:55 PM | #37 |
Resident Curmudgeon
Posts: 74,648
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Once you have the KF8 ready to go other then adding the negative margins, just open the eBook in the Calibre editor. Then in the main CSS file, add the following to the top of the CSS file and save the eBook.
Code:
html { margin-right: -45px; margin-left: -45px; } |
05-16-2019, 03:57 PM | #38 | |
Resident Curmudgeon
Posts: 74,648
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
After your conversion is when you put in the negative margins in html using the Calibre editor and you have to do so in the main CSS. It's actually really easy. Calibre's conversion doesn't support negative margins so don't even try to figure out how to do it during a conversion. Last edited by JSWolf; 05-16-2019 at 04:00 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to reduce line spacing int the main window ? | PO40600 | Library Management | 8 | 12-29-2015 04:15 PM |
How do I reduce line spacing when I have superscripts | jrjung | Conversion | 2 | 09-04-2015 03:36 PM |
Hack to reduce KF8 line height | JSWolf | Kindle Developer's Corner | 2 | 10-05-2014 05:06 PM |
Icarus 9.7 'Pdf Reader' app and spacing, margins and fonts | einkuser | Onyx Boox | 2 | 03-21-2014 08:04 PM |
Line Spacing and Margins | la3541 | Sony Reader | 0 | 06-02-2008 06:35 PM |