View Single Post
Old 09-20-2024, 02:29 PM   #6
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Just to make sure I understand, margin and padding should work the same around normal text (p, h1, etc.), but some ereaders might treat them differently.

For example, in a pure text document if I want a heading which starts a page to be separated a bit from the top of the page and the paragraph which follows it, I'd normally use:

Code:
h1 {
  font-size: 1.5em;
  margin: 0.5em 0;
  line-height: 1.2em; /* reduce space between lines if text wraps */
}
I could have used padding instead of margin, but it might have a different appearance depending on the ereader.

I'd guess conversion to kepub and how the reader renders that might also cause differences.

Last edited by foosion; 09-20-2024 at 02:31 PM.
foosion is offline   Reply With Quote