margin:0 auto在Internet Explorer中不起作用

时间:2012-04-30 08:00:37

标签: css internet-explorer css-float margin

保证金:0自动无法在Internet Explorer中运行。它在firefox中运行良好。

请查看网站http://jobslanda.com/

#Body{
    background: none repeat scroll 0 0 #FFFFFF;
    margin:0 auto;
    min-height: 500px;
    padding: 23px 20px 10px;
    width: 1000px;
    background-color:#ffffff;   
}
#wrapper {
    background-color: #FBF8F4;
    border: medium none;
    margin: 0 auto;
    position: relative;

}

请帮我解决这个问题。

此致

苏尼

1 个答案:

答案 0 :(得分:1)

我假设您指的是第二条规则#wrapper。自动边距仅在元素具有已知宽度时有效;目前#wrapperwidth:auto,因此没有留下余地来分配。