View Single Post
Old 02-22-2013, 08:59 AM   #9
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,789
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by elemenoP View Post
The CSS used is the same CSS I have been using during my Calibre conversions, and it is working fine there. Perhaps Calibre was also doing something else behind the scenes.
Yes, the ExtraCSS code you type in is used by calibre to create new css in the output epub. The ExtraCSS isn't just copied as-is. That's why you need to add all those body.calibre, body.calibre1, ... etc to your PRS+ custom Charis.css.

Quote:
Originally Posted by elemenoP View Post
The margin-top value seems to work just fine to put a margin at the top of each page, not the first paragraph of a chapter.
I'm going to take an educated guess that the reason you are getting the page top margin you want is indeed due to your calibre conversion settings. But it is likely not your ExtraCSS which is creating it, but rather the settings you used on the Convert - PageSetup page. Any value, other than 'No margin', in the Margins: Top and Bottom boxes creates an @page {margin-top: value; margin-bottom: value} in the output epub css. These days it is stored in a second css file called page_styles.css. Before that it was stored in every single html file in the epub.

[Just for completeness I'll add, the Left/Right margins from the PageSetup page (if not set to 'No margin') are stored in the epub main css file, in whichever css class calibre has created for the <body> tag.]

Quote:
Originally Posted by elemenoP View Post
My hope was that I wouldn't have to do Calibre conversions any more!
It's possible that you may not need to convert all future epubs, but be aware that non-calibre-converted epubs use more than one method to produce their intended page margins:
  • Left/Right can be in an @page{...} statement, in the body class or in the Adobe-specific file page-template.xpgt.
  • Top/Bottom can be in an @page{...} statement or in the Adobe-specific file page-template.xpgt.
some retail epubs may even use all of them and the margins are additive so you get the 'landing strip' or the 'postage stamp' look! The setting I outlined in the second-half of my earlier post attempt to override the various possible page margins which may already be in the epub (calibre-converted or other) and replace them with your chosen settings as per the @page in Charis.css. Unfortunately, there's nothing you can do in PRS+ to override the aggravating (IMO) page-template.xpgt file, so my personal choice is to always remove this immediately from any new epub (needs to be non-DRM) using the calibre 'Modify Epub' plugin. I believe a calibre epub-epub conversion will also remove it, but since you're trying to avoid that...
jackie_w is online now   Reply With Quote