View Single Post
Old 11-18-2019, 09:21 PM   #5
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: 80,036
Karma: 147977995
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 deback View Post
In the Editor, you only need to change the left and right margins for the body class (in the *.css file), which is normally "calibre," but not always. If you change the body class and then change the left and right margins in the classes for the paragraphs, you will not have the results you intended.

Another way to change any of the four margins is to use Convert. Open the preferences from the main Calibre window (ctrl-P). Click on Common Options and then click on Page Setup. Over near the bottom on the right, fill in the left and right margin lines with the values you prefer. Click Apply and then when you convert, your margins will be what you've set under Page Setup--and you won't need to edit the page_styles.css or the stylesheet.css files.
Converting ePub > ePub is a bad idea. Don't do it.

As to what needs to be changed in the ePub depends on the ePub's code. @page has to go in the CSS. Body has to have the margins set to 0. if there is a p, it has to have the margins set to 0. If there are p modifying classes, they have to have the margins changed depending on what they do. You might also want to reduce the indent and the space used for offset text.

There is not a one size fits all solution. But the more you work with the HTML/CSS, the easier it will get.
JSWolf is offline   Reply With Quote