[英]Div shifted in IE Compatibility Mode
The Close to Play button on the advertisement box is shifted to the right for some reason on IE, when Compatibility mode is checked 当选中兼容模式时,广告框上的“关闭播放”按钮由于某种原因在IE上向右移动
Screenshot: 截图:
http://piclair.com/data/2sm0j.jpg http://piclair.com/data/2sm0j.jpg
URL: http://www.animefushigi.com/sacred-seven-episode-6/4 网址: http : //www.animefushigi.com/sacred-seven-episode-6/4
Any ideas on how to fix? 有关如何修复的任何想法?
I believe the problem may be the margin-left.
我相信问题可能是边缘左边。 But without that then it will look correct on other browsers.
但没有它,那么它在其他浏览器上看起来是正确的。
Replace margin-left: 42%
with margin: auto
:) 替换
margin-left: 42%
margin: auto
:)
This works because: http://www.w3.org/TR/CSS21/visudet.html#blockwidth 这是因为: http : //www.w3.org/TR/CSS21/visudet.html#blockwidth
Block-level, non-replaced elements in normal flow
正常流程中的块级非替换元素
If both 'margin-left' and 'margin-right' are 'auto', their used values are equal.
如果'margin-left'和'margin-right'都是'auto',则它们的使用值相等。 This horizontally centers the element with respect to the edges of the containing block.
这使元件相对于容纳块的边缘水平居中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.