IE8 渲染额外的填充或边距
我在使用 IE8 时遇到了一些边距或填充问题,希望这里有人能够帮助我解决。下面是 IE7 中具有正确间距的网站屏幕截图(在 FF 和 Chrome/Safari 中看起来也几乎相同)。
替代文本 http://img80.imageshack.us/img80/9376/screenshot20100721at749.png< /a>
接下来是 IE8 中的同一页面,在由行和描述创建的内容之间有一大堆额外的间距。
替代文本 http://img687.imageshack.us/img687/9376/screenshot20100721at749.png< /a>
您可以这里查看实时网站< /a>.我搞乱了填充和边距,但没有任何运气,我不知道额外的空间来自哪里。使用 IE 开发人员工具检查该元素显示了一个对我来说不重要的偏移量,但我不确定为什么会发生这种情况。
任何帮助将不胜感激。
I'm having with some margin or padding issues with IE8 that I'm hoping someone here will be able to help me out. Below is a screenshot of the site in IE7 with the correct spacing (it looks pretty much the same in FF and Chrome/Safari as well).
alt text http://img80.imageshack.us/img80/9376/screenshot20100721at749.png
Next is the same page in IE8 with a whole bunch of extra spacing between the created by line and description.
alt text http://img687.imageshack.us/img687/9376/screenshot20100721at749.png
You can take a look at the live site here. I've messed around with the padding and margins without any luck, I have no idea where the extra space is coming from. Inspecting the element using the IE developer tools shows an offset that doesn't add up to me, but I'm not sure why this would be happening.
Any help at all would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题在于
1 Voter
末尾的SPAN
。它应该是一个结束标签。将此代码更改为:这将解决您的问题。
The problem is with the
SPAN
at the end of<span style="padding-left: 10px">1 Voter<span>
. It should be a closing tag. Change this code to:This will fix your problem.
删除包含
与特别的人共享餐食的最佳地点。
的div
中的填充,并将该 div 替换为p
。看看会发生什么。相邻的垂直边距应正确折叠。Remove the padding from the
div
containingThe best places for sharing a meal with someone special.
and replace the div with ap
. See what happens. Adjacent vertical margins should collapse properly.