边距:在IE中自动不工作 [英] Margin: Auto not working in IE

查看:159
本文介绍了边距:在IE中自动不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网址: http://cyberbat.co.uk/test 容器边距:auto不工作,是否有任何其他方式把它放在IE的中间。

URL: http://cyberbat.co.uk/test container margin: auto is not working, is there any other way to put it in the middle in IE.

编辑:再次检查,index.php是错误的文件,我替换为索引.html。

Check it again, the index.php was the wrong file, I replaced it with index.html .

推荐答案

这是IE中的一个错误!
您只需为< div class =page> 创建一个持有人,并设置 text-align 中心

This is a bug in IE! You just need to create a holder for <div class="page"> and set its text-align to center

.page-holder{
    text-align:center;
}
.page{
    margin:0 auto;
}

<div class="page-holder">
    <div class="page">
    page content
    </div>
</div>

这篇关于边距:在IE中自动不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆