简体   繁体   English

ie8保证金最高错误

[英]ie8 margin top bug

I have no idea why IE8 is doing this, but I have two divs that contain navigation. 我不知道为什么IE8是这样做的,但我有一个包含导航两个div。 One is floated left, the other is floated right. 一个漂浮在左边,另一个漂浮在右边。 Both divs have a margin-top of 10px on them. 两个div的边距顶部均为10px。 Everything looks great in all the other browsers except IE8. 在所有其他浏览器中,除IE8之外,一切看上去都很不错。 The top margin disappears. 上边距消失。

I've tried changing the doctype from HTML5, to transitional, to strict and no suck luck. 我尝试将doctype从HTML5更改为过渡型,更改为严格,并且没有运气。

I've ran a combo of changing the doctype and using the http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" meta tag as well as http-equiv="X-UA-Compatible" content="IE=9,chrome=1" and http-equiv="X-UA-Compatible" content="IE=8,chrome=1" and it still no change. 我已经进行了更改文档类型并使用http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"元标记以及http-equiv="X-UA-Compatible" content="IE=9,chrome=1"http-equiv="X-UA-Compatible" content="IE=8,chrome=1"仍然没有变化。

I've added a &nsbp; 我添加了&nsbp; and a height:0; height:0; to the clear:both; clear:both; div in the CSS as indicated here: IE8 - Container with margin-top: 10px has no margin 此处显示的CSS中的div: IE8-带有margin-top的容器:10px没有边距

And that doesn't seem to work either. 而且这似乎也不起作用。 So, I am stumped. 所以,我很沮丧。 Not too sure what else to try. 不太确定还有什么尝试。

One thing I forgot to mention is that cufon is applied to the text, so I am not sure if that could be causing any issues or not. 我忘记提及的一件事是cufon应用于文本,因此我不确定这是否会引起任何问题。

您可以尝试重置样式表: CSS重置

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

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