The layout follows simple CSS rules. On opening both EPUB and HTML documents CSS rules are read from a series of locations in defined order.
Firstly, an inbuilt set of CSS (see html_default_css) is read for all files with the exception of those identified as FictionBook 2 format which have their own special case rules (see fb2_default_css).
Next, the CSS rules from the document itself are read. If you would rather avoid this, it can be suppressed using:
Finally a set of ‘user’ CSS is read. This defaults to empty, but can be supplied using:
Thus the user CSS is the last to be read and can potentially override all the settings made by the defaults and document CSS.