Internet Explorer 7 和 Internet Explorer 8 保证金显示问题
我在 IE7 和 8 中居中对齐 DIV 时遇到了一个小问题。还有一些小的高度问题,但当我到达它时,我会跨过那座桥...
我总是习惯
middleAlign {
width:someAbsWidth;
margin-right:auto;
margin-left:auto;
position:relative;
}
在所有浏览器中将我的 DIV 居中,并且它运作良好。但现在,我在 IE7 和 8 中使用此方法时遇到问题。它们没有将 div 居中;相反,它的行为就好像 margin-left 为 0。是否是其他 CSS 规则影响了 IE 中的边距显示?
我已将页面上传到我的服务器;该页面可在此处查看: http://drafts.thatcompdude.com/NewSite/
该页面仅呈现FF 3.6 没问题;铬8.0。
谢谢;
——迪伦
I was having a small problem with center aligning a DIV in IE7 and 8. There are some minor height issues also, but ill cross that bridge when I get to it...
I have always used
middleAlign {
width:someAbsWidth;
margin-right:auto;
margin-left:auto;
position:relative;
}
to center my DIVS in all browsers, and it has worked fine. But now, I am having problems with this method in IE7 and 8. They do not center the div; rather it acts as if the margin-left is 0. Could it be other CSS rules affecting the margin display in IE?
I have uploaded the page to my server; the page is viewable here: http://drafts.thatcompdude.com/NewSite/
The page renders just fine in FF 3.6; Chrome 8.0.
Thank you;
--Dylan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于顶部的评论,您的页面处于怪异模式。删除它,它将进入标准模式并开始工作。
Your page is in quirks mode because of the comment at the top. Remove it and it'll be standards mode and it'll start working.