如何阻止 IE7 由于 hasLayout 清除浮动

发布于 2024-08-30 03:19:39 字数 181 浏览 3 评论 0原文

我有一个包含元素,其中包含许多浮动元素。该包含元素还应用了百分比宽度值。

在 IE7 中,包含浮动的元素后面的内容被清除,因为宽度值赋予了它 hasLayout (我认为!)。

我不希望包含元素具有布局,但我确实需要它具有明确的宽度。有没有办法在 IE7 中解决这个问题,有效地强制 hasLayout=false。

I have a containing element with a number of floated elements in it. That containing element also has a percentage width value applied to it.

In IE7, content following the element containing the floats is cleared because of the width value which gives it hasLayout (I think!).

I don't want the containing element to haveLayout, but I do need it to have an explicit width. Is there a way of working around this problem in IE7, effectively forcing hasLayout=false.

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

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

发布评论

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

评论(1

煮酒 2024-09-06 03:19:39

您可以使用以下方法修复一些 haslayout 渲染问题:

* {
 zoom: 1.0;
}

祝你好运。

You can fix some haslayout rendering problems using:

* {
 zoom: 1.0;
}

Good luck.

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