Quote:
Originally Posted by Jellby
Margins are combined/collapsed, padding is not. A div with bottom-margin:2em followed by a div with top-margin:1em will have 2em spacing between their contents (the largest margin survives). The same with padding will result in 3em spacing (they're just added). If there are borders, margin goes outside, padding goes inside.
|
That makes sense and could account for the difference if there's a div margin.
In my test case, there's no explicit div. If what I read is correct, the default margin, padding and border for div is 0.
I tried surrounding a chapter with <div> ... </div> (just inside body) and defined div as margin; 0. It didn't make any difference (as it shouldn't, based on the default).