IE7 中错误的浮动变形

发布于 2024-08-10 22:28:47 字数 452 浏览 2 评论 0原文

这是测试页面,在 IE7 中看起来不同,而在 Firefox 和 Firefox 中则正常。歌剧。
看起来像FF& Oprah 对右边距足够了

.twoColLiqRtHdr #mainContent {
     margin: 0 20px 0 10px;
}

,并相应地放置文本(文本填充侧边栏下的空间),而 IE 使用#sidebar 的左边框作为边距,因此,不使用该空间。
编辑:以下是精美图片中描述的全部内容:链接 .
请帮我解决它。

here's test page, which looks differently in IE7, while OK in Firefox & Opera.
Looks like FF & Oprah are adequate about

.twoColLiqRtHdr #mainContent {
     margin: 0 20px 0 10px;
}

right margin and place text accordingly (text fills space under sidebar), while IE uses #sidebar's left border as margin, and, as a result, that space is not used.
Edit: here's what it's all about described in nice picture: link.
Please, help me fix it.

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

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

发布评论

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

评论(2

御守 2024-08-17 22:28:47

#mainContent 中删除 zoom: 1

我知道您首先添加它是为了解决 IE 错误,但如果您还希望主要内容围绕浮动,您将必须找到另一种方法来做到这一点。也许您可以将其添加到主要内容中的选择元素。

请参阅著名文章“<”中标题为“浮动元素旁边的元素”的段落a href="http://www.satzansatz.de/cssd/onhavinglayout.html" rel="nofollow noreferrer">关于布局”。

Remove the zoom: 1 from the #mainContent.

I know you added that to work around IE bugs in the first place, but you're going to have to find another way to do that if you also want the main content to wrap around the float. Perhaps you can add it to select elements inside the main content.

See the paragraph titled "Elements next to floats" in the famous article "On having layout".

淡淡の花香 2024-08-17 22:28:47

您是否尝试过将 #sidebar1 的边距调整为 0,尤其是底部?或者向左浮动而不是向右浮动?
看,我不是 IE 的 CSS 黑客专家,但这可能会让你看到错误来自哪里。
当涉及到 IE7 时,可能会使用我一直以来最喜欢的 css-hack,有时它会给我带来奇迹:

* html div {
 margin: 0;
 padding: 0;
}

Have you tried adjusting the #sidebar1's margin to 0, especially at bottom? Or floating it left instead of right?
See, I'm not a crack in CSS-hacking for IE but probably this will enable you to see were the error is coming from.
Probably use my all-time favorite css-hack when it comes to IE7, sometimes it does wonders to me:

* html div {
 margin: 0;
 padding: 0;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文