网址:http://cyberbat.co.uk/test container margin: auto 不起作用,有没有其他方法可以将它放在 IE 的中间。
编辑:再次检查,index.php 是错误的文件,我用 index.html 替换了它。
最佳答案
这是 IE 中的错误!
您只需要为 <div class="page">
创建一个持有人并设置它的 text-align
至 center
.page-holder{
text-align:center;
}
.page{
margin:0 auto;
}
<div class="page-holder">
<div class="page">
page content
</div>
</div>
关于css - margin :自动在 IE 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7810326/