View Single Post
Old 05-04-2019, 04:28 PM   #22
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by odamizu View Post
However, if the book has left/right margins set at a higher level in the CSS cascade (e.g., <p>), then don't those need to be deleted? Otherwise, wouldn't the <p> margins override the <html> margins?
I don't know the specifics of CSS behaviour on a Kindle but normally cascading style attributes don't all work the same.

To the best of my knowledge left/right margins are additive. For instance, if you had CSS like
Code:
body {margin-left: 1em; font-size: 1.5em; font-family: serif}

blockquote {margin-left: 2em; font-size: 0.75em; font-family: monospace}

p {margin-left: 0.5em; font-size: 2em; font-family: sans-serif}
with HTML:
Code:
<body>
  <blockquote>
    <p>The text in these paragraphs will all have:</p>
    <p>- an additive left-margin of 1+2+0.5 = 3.5em</p>
    <p>- a multiplicative font-size of 1.5*0.75*2 = 2.25em</p>
    <p>- the most specific override font-family = sans-serif</p>
 </blockquote>
</body>
jackie_w is offline   Reply With Quote