IE8 兼容模式 (IE7) 中奇怪的边距更改
在 IE8 兼容模式(ie7)下查看我的页面时,我的边距发生了一些奇怪的变化。具体体现在2个方面。主要导航和页脚。
正如您所看到的,导航的左侧边距比 IE8/FF/Chrome/Safari
http://demo.carbonium.no/iebug1.png
广告下方应该有空间。此问题在所有 IE 浏览器中均存在,但在 FF/Chrome/Safari 中则不然
i'm suffering some odd changes in margin when viewing my page in IE8 compatibility mode (ie7). Specifically in 2 areas. The Primary navigation and the footer.
As you can see the navigation is experiencing a much larger margin from the left then what is seen in IE8/FF/Chrome/Safari
http://demo.carbonium.no/iebug1.png
Below the advertising there is supposed to be space. This problem persists in all IE browsers but not in FF/Chrome/Safari
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我找到了解决导航问题的方法。使用绝对定位和Z-index:1;将元素从自然文档流中取出来解决了这个问题。此外,用填充替换边距在某种程度上可以给你带来相同的结果。不管怎样,我仍然很困惑为什么 IE7 会导致这个特定的问题。
Alright, i found a work around to the problem i was having with the navigation. Using absolute positioning and Z-index:1; to take the element out of the natural document flow solved the problem. Also it would seam that replacing margins with padding can to some degree give you the same result. Either way i am still confused as to why IE7 causes this particular issue.