unexpected margin with very simple html

后端 未结 5 526
说谎
说谎 2021-01-19 00:29

I have a very simple html. The red div is inside the blue div and has a 10 px top margin. On non-ie browsers, the blue box is 10 px apart from the top of viewport and the re

5条回答
  •  离开以前
    2021-01-19 00:47

    Could it be IE sees the DOM as div.inner having div.outer as it's parent node(and calculates offset from it),
    and that other browsers instead has both of them answering to the body element?

提交回复
热议问题