uninvited "user agent stylesheet"
Hi
One friend of mine showed me an illustrated book in odt format so that I could test a converter. I was surprised by the display of some images on the EPUB: it seemed like there was an unexpected added margin around them.
I used the Calibre inspector to check what happened with the CSS. I found that a "user agent stylesheet" had crept in and wrapped a 8px margin around the image. It was unherited from the body value of this uninvited stylesheet.
Mr "User agent" had other ideas too about h2 and h3 like font-size, webkit-margin-(before, after, start, end), font-weight...
I did not have set margin for the body, but nevertheless I found this behaviour very surprising because these foreign values do not appear anywhere in the code. Had not the Inspector been around, I would have been totally puzzled.
How to prevent these "user agent stylesheets" to come in again unexpected and unrequested?
|