View Single Post
Old 01-19-2012, 11:51 AM   #44
jackie_w
Grand Sorcerer
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: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by treadlightly View Post
Can margins, alignment or line spacing be set in style.css? I tried

html { text-align: justify; }

but perhaps I have the wrong syntax.
There's no reason why you can't set those properties. I set line-height and font-size in mine.

If it's not working for a particular epub it's probably because some of the css inside the epub is more specific and is overriding your top level setting. This is particularly likely if you created your epub using Calibre, depending on the conversion settings you used.

You can try and add more to your style.css to combat the epub's own css. If you are a Calibre user you could try something like
Code:
body, body.calibre, body.calibre1, body.calibre2, body.calibre3
    {text-align: justify; 
      line-height: ???; 
      margin-left: ???; 
      margin-right: ???}
filling in the ??? with whatever values you want.

If that still doesn't work, you could try changing the first line to
Code:
body, body.calibre, body.calibre1, body.calibre2, body.calibre3, div, p
If it still doesn't work (and it's a non-DRM'd epub) it's likely that you would need examine the epub css and manually remove the text-align, line-height, margin settings which are stopping your style.css working.

I'm afraid, with epubs there's no "automatic magic solution" which works 100% of the time.

An alternative option is to use one of the other epub reading apps (FBReader, CoolReader) rather than the Sony reader or Morkl's much improved modified version. You would need to root your T1 to do that. Those apps ignore most (all???) the css inside the epub and let you define your own settings. This is why many people like these apps. The problem is that you may not want ALL the epub css to be ignored if it's a well-formatted epub. In this case the Sony app is better option, especially with Morkl's changes. You just have to decide which approach you prefer.

Last edited by jackie_w; 01-19-2012 at 12:09 PM. Reason: alt option
jackie_w is offline   Reply With Quote