I am experiencing a strange issue where the margin of a nested DIV is "leaking" out of its parent container.
For a better understanding, check out this test case:
The outer wrapper (highlighted in red) does not align perfectly at the top unless there is a text node or overflow: auto;
applied to that element.
(Tested on Firefox and Safari.)
Although using overflow as a workaround helps, I am curious to understand why this behavior occurs in the first place. Any insights would be greatly appreciated!
* This test case is minimal except for the script at the bottom, which only demonstrates the workarounds