关于 this page ,主要内容嵌套在<div id="container">
下.我尝试使用以下方法将内容居中:
#container {
margin: 0 auto;
overflow: auto;
width: 960px;
}
它在 Firefox 中运行良好,但在 IE8 或 IE9 中运行不佳。有没有办法在所有现代浏览器中将内容居中?
最佳答案
如果您从 #stickyWrap 元素中删除 display: table
,它就会起作用。你有理由需要那个吗?它似乎没有改变任何其他内容。
关于css - 在 IE8 中水平居中 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9262616/