Overflow issue in IE 7

╄→尐↘猪︶ㄣ 提交于 2019-12-12 01:54:26

问题


I need some help with CSS overflow in IE, namely IE 7. I want the nested div content to be hidden.

<div style="width:100px; height:100px; overflow:hidden; border:1px dashed red;">
    <div style="width:60px; left:80px; position:relative;">hidden stuff goes here</div>
</div>

It works fine in FF but in IE 7, the overflow content is not hidden.


回答1:


Add display:none to the inner div and it will be hidden. I think you are mis-understanding the use of overflow:hidden though...

<div style="width:100px; height:100px; overflow:hidden; border:1px dashed red;">
        <div style="width:60px; left:80px; position:relative; display:none;">hidden stuff goes here</div>
    </div>


来源:https://stackoverflow.com/questions/2510815/overflow-issue-in-ie-7

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