简体   繁体   English

IE7 div(容器内)差距和误判问题

[英]IE7 div (within a container) gap and misalisgnment problem

I'm having an issue where IE7 simply will not display my DIV's properly..Firefox 3, Safari, Opera, Chrome, IE8 and even IE6 (with some JS help) display the page fine, but for some reason, in IE7 the footer seems to be...outside of the container. 我有一个问题,IE7根本无法正常显示我的DIV ..Firefox 3,Safari,Opera,Chrome,IE8甚至IE6(有一些JS帮助)显示页面很好,但由于某种原因,在IE7的页脚似乎......在容器之外。 You can clearly see a gap between the footer and the #content div in the below screenshot. 您可以在下面的屏幕截图中清楚地看到页脚和#content div之间的差距。 There is also some misalignment from the #information div down. #information div也存在一些错位。

IE7 div差距问题

The link to the live site is: http://chronologic.ath.cx . 现场网站的链接是: http//chronologic.ath.cx

I can almost guarantee the issue is caused by my complete lack of understanding of CSS, so I apologize for the messy bloated markup. 我几乎可以保证这个问题是由于我完全缺乏对CSS的理解造成的,所以我为凌乱的臃肿标记道歉。

It looks like an issue of clearing floats because both elements inside of #footer are floated. 它看起来像是一个清除浮动的问题,因为#footer中的两个元素都是浮动的。 Try adding #footer { overflow:hidden; } 尝试添加#footer { overflow:hidden; } #footer { overflow:hidden; } . #footer { overflow:hidden; }

Just took a quick look, but you may want to rethink applying height: 100% to div#container. 快速浏览一下,但您可能想重新考虑应用height: 100%到div#container。 Older versions of IE frequently don't behave as expected and take 100% to mean the width or height of the page, not the container that it is in. I can't verify this though without further investigation. 较旧版本的IE通常不会按预期运行,并且100%表示页面的宽度或高度,而不是它所在的容器。虽然没有进一步调查,但我无法验证这一点。

overflow:hidden clear:both and making sure you have reset your HTML with html { padding: 0; margin: 0;} overflow:hidden clear:both并确保您使用html { padding: 0; margin: 0;}重置HTML html { padding: 0; margin: 0;} should fix it html { padding: 0; margin: 0;}应该修复它

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

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