How to stop IE7 clearing floats because of hasLayout

∥☆過路亽.° 提交于 2019-12-10 17:39:51

问题


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.


回答1:


You can fix some haslayout rendering problems using:

* {
 zoom: 1.0;
}

Good luck.



来源:https://stackoverflow.com/questions/2713063/how-to-stop-ie7-clearing-floats-because-of-haslayout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!