Quote:
Originally Posted by HarryT
No, Mobi has no support whatsoever for CSS. CSS can be used in the input files to a program which creates Mobi books (such as Calibre), but it all ends up getting converted to attributes in the HTML tags, which is what Mobi uses.
|
That would be fine if the conversion was always in the same units, not rounded differently into different units.
Quote:
Mobi's way of doing indents is to use the "width" attribute of a "<p>" or "<div>" tag. Eg,
will produce a 1em indent on the first line of the paragraph, while:
will produce a 1em hanging indent.
|
No, AFAICS, width="2em" gives a very narrow paragraph (or div), whereas width="-2em" seems to create a 2em margin on the right (I think). The only way I can find to get an indent or hanging indent is using text-indent. The problem I am facing is that calibre uses a different method to render whole paragraphs with a left margin from paragraphs with the first line indented. And the calculation of the left margin position finishes up different -- sometimes by a lot!
Quote:
If you want fine control over the appearance of the Mobi, you'd be better off using these Mobi attributes directly in your HTML source, rather than relying on CSS being "converted" the way that you assume it will be.
|
I would be happy enough to do that if it was clear exactly which attributes to set. Obviously passing the information via css is simpler, but a good editor can globally set attributes easily enough.