IE6 背景图像边距/填充/间距问题

发布于 2024-09-18 05:38:52 字数 440 浏览 6 评论 0原文

我目前正在设计一个页脚分为两个 div 的页面。顶部 div 显示背景图像以将其与主页分开,第二个 div 包含实际的页脚内容。

在所有浏览器中,它看起来如下所示:

Good

...除了 IE6,它看起来像:

Bad

我猜这是一个边距/填充问题,但我无法确定哪个 div 导致了它(它适用于除 IE6 之外的所有浏览器) !)。

如果任何人都可以确定额外空间的来源,则可以在此处找到正在进行的工作网站从。

I'm currently designing a page with a footer split into two divs. The top div displays a background-image to separate it from the main page, and the second div contains the actual footer content.

It looks like the following in all browsers:

Good

...except IE6, where it looks like:

Bad

I'm guessing it's a margin/padding issue, but I can't identify which div is causing it (it's working in all browsers except IE6!).

The work-in-progress site is available here, if anyone can identify where the extra space is coming from.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

情愿 2024-09-25 05:38:52

在 IE6 中,字体大小对块元素有直接影响。因此,要解决此问题,请将 font-size: 0 设置为 #footerTop DIV。

In IE6 font-size has direct effect on block elements. So, to fix this, set font-size: 0 to the #footerTop DIV.

谜兔 2024-09-25 05:38:52

首先,设计不错!

其次,您是否尝试过将顶部 div 的行高设置为 0 ?偶尔为我解决问题。

First of all, nice design!

Secondly, have you tried setting the line-height to 0 in the top div? Occasionally fixes the issue for me.

红墙和绿瓦 2024-09-25 05:38:52

尝试删除标签之间的所有空格。我以前在 IE 6 中也遇到过这种情况。所以

<div id="footerTop"></div>

        <div id="footer">

不要: 而是:

<div id="footerTop"></div><div id="footer">

try removing any spaces between the tags. This has happened to me before in IE 6. So instead of:

<div id="footerTop"></div>

        <div id="footer">

do:

<div id="footerTop"></div><div id="footer">
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文