【发布时间】:2014-01-15 01:11:23
【问题描述】:
给出以下代码:
<!doctype html>
<div style="position:relative;border:1px solid red;width:500px;overflow:visible;">
<div style="height:200px;border:1px solid orange;float:right;">test</div>
</div>
stuff
除了 IE7(以及兼容 IE7 的 IE8)以外的所有浏览器都可以正确显示此内容,但是在 IE7 中,父 div 会自动扩展为浮动子元素的高度。
有什么办法可以禁用这个“功能”,这样我就可以让一个浮动的 div 超出父级的结束标记?
【问题讨论】:
标签: css internet-explorer internet-explorer-7