简体   繁体   English

边距:汽车不能在IE5中工作

[英]margin:auto not working in ie5

Using IE11's developer tools you can change the browser mode. 使用IE11的开发人员工具,您可以更改浏览器模式。 Everything looks fine in Edge, 10, 9, 8 and 7, however IE5 forces the div to be aligned to the left rather than the middle. 在Edge,10、9、8和7中,一切看起来都很好,但是IE5迫使div左对齐,而不是中间对齐。

Can someone tell me what am I doing wrong? 有人可以告诉我我在做什么错吗?

IE 5 predates Microsoft's support for auto margins . IE 5早于Microsoft对自动页边距的支持

You can hack it by (exploiting a bug in old-IE and) setting text-align: center on the parent element and then text-align: left on the element you want centred. 您可以通过以下方法来破解它:(利用旧版IE中的错误,然后)在元素上设置text-align: center ,然后在要居中的元素上设置text-align: left

That said, IE5 is very old, completely unsupported by Microsoft and with a market share as close to zero as makes no difference for almost everyone. 也就是说,IE5很老,完全不受Microsoft支持,其市场份额几乎为零,几乎对每个人都没有影响。 I wouldn't try supporting it at all. 我完全不会支持它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM