relative positioning with percentage values in top property

点点圈 提交于 2020-01-15 10:45:27

问题


jsfiddle

The above snippet renders the way I intend it in Chrome (v.20). However in Firefox 11 and IE 9 the 2nd and 3rd content divs do not appear to take into account top and left CSS values.

What is the correct method of relative positioning with percentage widths?


回答1:


I your case container doesn't have height. You can use this:

body, html {
    min-height: 100%;
    height: 100%;
}


来源:https://stackoverflow.com/questions/11777293/relative-positioning-with-percentage-values-in-top-property

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!