Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 05-11-2019, 01:36 PM   #31
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Quote:
Originally Posted by mariowarner View Post
Oh, I will definitely try this! I hope it works on my side! But hiw does this reduce the margins? Would you have to still add the CSS line?
It looks to me like calibre is rewriting the css and sets the margins to 0.
lumpynose is offline   Reply With Quote
Old 05-12-2019, 05:07 PM   #32
sloth00
Junior Member
sloth00 began at the beginning.
 
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
}
sloth00 is offline   Reply With Quote
Old 05-12-2019, 11:06 PM   #33
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,599
Karma: 4798866
Join Date: Mar 2015
Device: Kindle, iOS
Quote:
Originally Posted by sloth00 View Post
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
}
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.
odamizu is offline   Reply With Quote
Old 05-13-2019, 12:06 AM   #34
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Quote:
Originally Posted by sloth00 View Post
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
}
I think that works but it makes more sense to me to put it on the body tag instead so try that just in case it doesn't work.

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.
lumpynose is offline   Reply With Quote
Old 05-13-2019, 03:22 PM   #35
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
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.
lumpynose is offline   Reply With Quote
Old 05-14-2019, 07:01 PM   #36
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
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;
}
All of my Kindle books are AZW3, converted from EPUB by Calibre. Since I have the checkboxes selected as I stated above the css generated by Calibre doesn't put any margin on the p tags (i.e., sets it to 0).
lumpynose is offline   Reply With Quote
Old 05-16-2019, 03:55 PM   #37
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: 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;
}
Then you are done. It does work for me. It's what I do and it's what works. I do make sure there there are no left/right margins for normal paragraphs as they don't need any.
JSWolf is offline   Reply With Quote
Old 05-16-2019, 03:57 PM   #38
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: 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:
Originally Posted by lumpynose View Post
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;
}
All of my Kindle books are AZW3, converted from EPUB by Calibre. Since I have the checkboxes selected as I stated above the css generated by Calibre doesn't put any margin on the p tags (i.e., sets it to 0).
Negative margins don't work in <body>. They never have.

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.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 09:34 PM.


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