View Single Post
Old 09-02-2022, 05:21 PM   #8
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: 79,966
Karma: 147448039
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 enuddleyarbl View Post
I think the problem has to do with my body statement in my css. I followed the suggestion in:

https://wiki.mobileread.com/wiki/CSS_HowTo#Essentials

and included html in my body statement:
Code:
body, html {
/* Basic Styling for HTML and BODY Sections of a File */
	border-width:	0;
	height:	100%;
	margin:	0;
	orphans:	1;
	padding:	0;
	widows:	1;
}
If I pull the ", html" bit off (leaving just body), the Viewer behaves normally. Well, more normally. Without including "html," the Viewer's margin settings override the book's css margin settings. With the "html" settings, the book's margins apply, but the right and bottom margins are ignored. Unfortunately, I'm not knowledgeable enough to know if that's correct behavior.
Forget html. It's not needed. And height: 100%; could be a problem. I have no idea what it's doing in the body and html CSS. It's not essential at all. Also, you don't need border-width and padding.

This is the body code I use and it works perfectly in the Calibre viewer and on a Kobo in both ePub and KePub.
Code:
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}
JSWolf is offline   Reply With Quote