Why does this CSS margin-top style not work?

前端 未结 12 1963
醉梦人生
醉梦人生 2020-11-21 04:54

I try to add margin values on a div inside another div. All works fine except the top value, it seems to be ignored. But why?

What I expected:
<

12条回答
  •  情书的邮戳
    2020-11-21 05:23

    I guess setting the position property of the #inner div to relative may also help achieve the effect. But anyways I tried the original code pasted in the Question on IE9 and latest Google Chrome and they already give the desirable effect without any modifications.

提交回复
热议问题