css - 替代位置 : relative; for overflow: auto; bug in IE7

标签 css scriptaculous internet-explorer-7

我的内容是这样安排的:

<div id="thumbnails" style="width: 40px; overflow: auto;">
  <div style="float:left; width: 20px;">content</div>
  <div style="float:left; width: 20px;">content</div>
  <div style="float:left; width: 20px;">content</div>
  <div style="float:left; width: 20px;">content</div>
  <div style="float:left; width: 20px;">content</div>
  <div style="float:left; width: 20px;">content</div>

在 IE7 中,这显示内容超出了可滚动框。到处的答案都是让#thumbnails position:relative。我的问题是#thumbnails 中的元素是可拖动的脚本,它们拖到缩略图之外,带有绝对定位的元素的幽灵。如果父级是 positioned:relatively 因为现在绝对位置是相对于 #thumbnails 而不是 <body> .有谁知道 IE7 错误的替代解决方案?

最佳答案

你听说过这个烦人的 IE“hasLayout”属性吗? http://msdn.microsoft.com/en-us/library/bb250481(VS.85).aspx (引用一些 msdn 伤害,我现在觉得很脏......)。无论如何,尝试将“缩放:1”应用于您的容器:它可能会改善这种情况。唯一问题:缩放属性仅适用于 IE,并且会在其他浏览器下的 css 日志中创建警告。

关于css - 替代位置 : relative; for overflow: auto; bug in IE7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2953031/

相关文章:

javascript - 在 script.aculo.us 中传递动态参数

javascript - 将对象拖出 IFrame

jquery - Internet Explorer 7 css js 表格列显示错误

css - css 子选择器之后/之前应该有一个空格吗?

html - 在标题中的图像上构建文本

html - 侧边栏没有网页的完整高度

javascript - Scriptaculous Droppables onDrop 回调,如何引用每个元素?

html - IE7 上的 H3 css 问题

css - 在宽度为 :100% IE7 的 div 容器中向左浮动和向右浮动

javascript - iFrame 更改 iFrame 中的 css 类