Thread: Touch Cover image frustrations
View Single Post
Old 10-28-2012, 06:19 PM   #20
scoobertron
Connoisseur
scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 349476
Join Date: Jul 2012
Device: Kobo touch
Quote:
Originally Posted by RG1 View Post
I use the first way. Covers get zero margins by using a body class for the cover page. No .css stylesheet or page-template is used for the cover page. The styles go directely in the code of the html page.
Code:
  <head>
...
  <style type="text/css">
/*<![CDATA[*/

  @page {padding: 0pt; margin: 0pt;}
            body.nb {padding: 0pt; margin: 0pt;}
  /*]]>*/
  </style>
</head>

<body class="nb">
...
The .css stylesheet for all book chapters have margins set by the publisher. Since the kobo has a known bug and can't use right and left margins for <body>, i have to use padding instead.
Code:
	@page {
		margin-top: 5px;
		margin-bottom: 5px;
	}
	body {
		padding-left: 20px;
		padding-right: 20px;
	}
You can change the margins when reading, since the kobo will add it's own margins in addition to the margins set in the book.
I am afraid I don't follow this as my knowledge of html/css is very limited. Most of my books have the same structure as the file I attached earlier in the thread, where the cover is (I believe) handled by a cover.xml file. Is there an easy change I could make to this file which would set the cover margins? (I could then script this to replace this file in all my books with the fixed version)
scoobertron is offline   Reply With Quote