Originally Posted by EricDP
I've attached an updated style sheet which takes care of both, for your consideration.
The problem with "fixing" things for someone is that it often breaks them for someone else[*]. Regarding the margin and the justification, I'd prefer to leave them to be specified by the reader. The Cybooks, for instance, can change between left-aligned or justify text, but only if I don't specify any particular alignment in the CSS. If I set some margin, some readers will add it to the default, and others that would allow the user to set the margins, won't do that if the margin is hardcoded... As things are now, I prefer to keep things simple, it's already easy enough for the user to modify the stylesheet (at least for users who know how to do it, the others can complain to the reader makers).
The issue with the top margins of chapters is different, and you are probably right. However, note that for margins:
"The percentage is calculated with respect to the width
of the generated box's containing block. Note that this is true for 'margin-top' and 'margin-bottom' as well."
which can also fail in other cases...