简体   繁体   中英

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

Screenshot:

在此输入图像描述

http://piclair.com/data/2sm0j.jpg

URL: 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 :)

This works because: 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. This horizontally centers the element with respect to the edges of the containing block.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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