View Single Post
Old 07-17-2020, 03:25 PM   #5
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,590
Karma: 14328510
Join Date: Nov 2019
Device: none
Analyze the html; see if there is a css class used for the body paragraphs. And a css class for a div that wraps the entire chapter (or occasionally a section tag instead of a div). And a css class for the body tag. If there is then delete its line-height. Those are the first things I fix in a bought book. What I really do is delete those classes from the html with a search and replace on all of the html files; e.g. <body class="calibre"> becomes <body>. After that I append at the end of their stylesheet(s):
Code:
body {
    font-size: 100%;
    border: 0;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    width: auto;
}
body * {
    line-height: inherit;
}
p {
    font-size: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    text-indent: 2em;
}
The second body thing, with the asterisk, says that anything that's a child of the body tag, presumably everything, inherits its line-height from the body tag; that might be a good thing to try.

The above css won't be used if there are any classes on the corresponding html tags since ones with classes are higher in precedence than ones without classes.

Last edited by hobnail; 07-17-2020 at 03:46 PM.
hobnail is offline   Reply With Quote