IE10的DIV位置问题

时间:2013-10-06 08:00:30

标签: html css

您是否知道为什么在IE10上我的“错误”消息与我的表单中的“Envoyer / Submit”按钮重叠,以及如何解决这个问题?它在safari上工作正常,所以不确定问题是什么。另外.error有float: left但似乎不起作用。 这是一个JSFiddle:http://jsfiddle.net/u6Kre/

感谢您的帮助

.error {
    position: absolute;
    display: none;
    display: block;
    background: #EF6666;
    display: inline;
    padding: 3px 10px 3px 10px;
    top: 210px;
    float: left;
}

表格看起来不行(即使用IE10)

IE10 issue

表格看起来不错(即使用Safari)

Form OK with Safari

2 个答案:

答案 0 :(得分:0)

.error {
    position: absolute;
    display: none;
    display: block;
    background: #EF6666;
    display: inline;
    padding: 3px 10px 3px 10px;
    top: 210px;
    left:0px;
}

答案 1 :(得分:0)

你不需要float: left绝对位置,display: inline也不需要,因为绝对定位的元素被视为display: block,执行:

.error {
    position: absolute;
    background: #EF6666;
    padding: 3px 10px 3px 10px;
    top: 210px;
    left: 0; //to show it on left
}
相关问题