View Single Post
Old 09-13-2016, 07:37 AM   #21
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Katsunami View Post
W
Should it be:

or

I've encountered both in the forum, and with different values of padding.
Neither! The second lines of both of those are wrong, it should add padding to the div not set it to zero. However the problem you have, with the whole page shifted to the right, is not affected by the second line, only the first line:
Code:
body { margin: 0 !important; padding: 0 !important; }
div#book-columns { padding-left: 0.2em !important; padding-right: 0.2em !important; }
(alternatively you could replace the div#book-columns selector on the second line with something like body>div or body>*, but div#book-columns div is wrong and will cause lots of problems for some books.)

To be sure that Calibre is adding the CSS correctly it is best to examine a book after it has been sent to the device. i.e. after sending it to the device, copy the kepub.epub file from the device back to the PC and unzip it to check that the stylesheet and html has been modified correctly.

Last edited by GeoffR; 09-13-2016 at 07:44 AM. Reason: added !important
GeoffR is offline   Reply With Quote