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.