浮动 div 在 IE 和 FF 中低于其他 div
我在我正在处理的此页面上遇到一些浮动 div 的奇怪问题。页面上有 3 个,之间有 1em 的边距。在 Chrome 中,它们完美地排列在一起,但在 IE 和 FF 中,右手的一个下降了一点 - 但并没有完全低于。我认为这可能最好用图片来描述,请参见下面:
我无法解决CSS 的哪一部分导致了这种情况 - 我已经使用了新的 FF 代码检查器,并使用 webdev 工具栏突出显示了所有块级对象,但看不到任何会导致此类下降的内容。
我确实想知道是否是 JS twitter feed 中的某些内容导致了它,但我已经交换了 Twitter 和“更新”框,它始终是右侧的框。我还尝试从页面中删除其他元素 - 菜单和这三个框之间的所有内容。
我必须承认,我已经无计可施了!有人能发现我错过的明显东西吗? CSS 相当大,我不确定要显示哪一部分,所以我没有将其复制进去,但如果有人愿意,我会这样做。否则,所有内容都可以在 http://www.woodexperts.com 查看
I'm having an odd problem with some floated divs on this page that I'm working on. There are 3 of them across the page, with 1em margins between. In Chrome they line up perfectly, but in IE and FF, the right hand one drops a little - but not all the way below. I thought this might be best described with a picture, please see below:
I can't work out which bit of the CSS is causing this - I've been through the new FF code inspector and highlighted all block level objects with the webdev toolbar but can't see anything that would cause such a drop.
I did wonder if it was something within the JS twitter feed causing it, but I've swapped round the Twitter and "Update" boxes and it's always the right-hand one. I've also tried removing additional elements from the page - everything between the menu and these three boxes.
I must admit, I'm at my wit's end! Can anyone spot something obvious I've missed? The CSS is fairly large, and I'm not sure which bit to show, so I haven't copied it in in, but will do if anyone desires. Otherwise everything can be viewed at http://www.woodexperts.com
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将
div#main div.tricolumn
中的width: 15.25em
更改为width: 15.24em
这应该可以解决这个问题。
Change
width: 15.25em
indiv#main div.tricolumn
towidth: 15.24em
That should take care of the issue.
我知道这是一个 hack,但如果 IE 是唯一导致问题的浏览器,您可能需要考虑 IE 条件注释,仅限制 IE 的某些样式:
http://msdn.microsoft.com/en-us/library/ie/ms537512(v=vs.85).aspx
I understand that this is a hack, but if IE is the only browser causing problems, you might want to consider IE conditional comments that restrict certain styles only for IE:
http://msdn.microsoft.com/en-us/library/ie/ms537512(v=vs.85).aspx