It is complicated, because not all of the internal settings are done with CSS, and even the ones that are done with CSS don't come from a single static stylesheet but instead the device creates a stylesheet on the fly from various fragments depending on what settings the user has selected.
For example the ePub reader has a completely different method of setting the margins than the KePub reader, and the KePub reader uses two completely different methods depending on whether it is in full-screen mode or not.
The ePub reader also accepts an XPGT stylesheet which is not CSS, some publishers include this in the book usually named page-template.xpgt, it can set margins and do some things that can't be done via CSS.
To set the base page margins to zero for ePub books you can use CSS as:
@page { margin: 0px; }
body { margin: 0px; }
but you might also need to remove the XPGT stylesheet if the book has one, and if the publisher (or Calibre during the conversion process) has set the margins in a subclass of body then you also need to remove them from that subclass because you can't override them just by adding !important to the body style.
e.g. when Calibre converts a book that originally has body margins set as:
<body>
</body>
body { margin-left: 5pt; margin-right: 5pt; }
it changes that to:
<body class="calibre">
</body>
.calibre { margin-left: 5pt; margin-right: 5pt; }
so if the book has ever been through the Calibre conversion process you probably need to go through and delete the margins from the .calibre class too.
Edit: To be able to completely remove all margins, header, footer, etc. to use every pixel on the screen for book content you need to either use the ePub reader in full-screen mode, or the KePub reader in full-screen mode plus a firmware patch called `KePub default margins`.
Last edited by GeoffR; 03-06-2017 at 07:29 AM.
Reason: ... to use every pixel on the screen for book content ...
|