IE6 Peekaboo Bug

The setup:

A liquid box has a float inside, and content that appears along side that float. All is well, until it's viewed in IE6. "Wah? Where's my content?!" You reload the page, and nothing. When you scroll down, or perhaps switch to another window, upon returning to the 'scene of the crime' there it all is, fat 'n sassy!

Note: This long standing bug has been suppressed in IE7 (released in late 2006), so the Peekaboo Bug is finally on the way out. IE6 will still exist however, and as long as it does we'll need to fix it.

The demo:

div#floatholder (dotted border) is dimensioned horizontally by margins, and vertically by content. div#float (thick brown border) is floated left, and contains a test link. Following that are several lines of bare text, alternating with divs containing more text, plus test links. Next is a cleared div (purple border), then another div for good measure.


Float

test link

This is bare text. Test link

This is text inside a div. Test link

This is bare text. Test link

This is text inside a div. Test link

This is bare text. Test link

This is text inside a div. Test link

This is bare text. Test link

Clearing div
This div is after the cleared div. (purple box) If cleared div does not touch float, bug is not triggered. Test link

To reset bug, reload page. Screenshot

The bugs:

This effect may turn up in a number of different contexts. We would try to list them here, but the page would become very long, and make our heads hurt.

Fun with links:

Try clicking the links. This will reveal the missing content, same as scrolling. If the float is a linked image, same deal. But only links within div#floatholder, and before the clearing div will expose the missing content.
But check out the last link in the content area. Weird!

Special notes:

Multiple repetitions of the content div containing the triggers can behave very strangely. As argued on css-d, it appears to be triggered by the clearing div. When it is forced to clear a float, the previous content after the float gets covered somehow, perhaps by the background on div#floatholder. (dotted border)

The fixes:

Finally, this bug will be triggered even if div#float preceeds div#floatholder, provided that this external float actually touches the clearing div within div#floatholder!

There are three ways we know to prevent this bug.

  1. Keep the clearing div from touching the float, or avoid using a background on div#floatholder. Not exactly ideal.
  2. Give both div#floatholder and div#float 'position: relative'. Be sure to fully test this method.
  3. Give div#floatholder hasLayout (now the preferred method)

We suggest using a conditional comment to feed a hasLayout fix to IE6 and below only. Further details helpful to this method may be found in the Zoom Fix page.

Thanks to Simon Willison for the timely screenshot.

Big John Design   Contact Us ©positioniseverything.net
Last updated: September 9th, 2008
Created July 7, 2002

IE6躲躲猫bug -IE6 Peekaboo Bug相关推荐

  1. IE6 Peekaboo(躲躲猫) Bug

    IE6 Peekaboo(躲躲猫) BugPeekaboo本意就是"躲躲猫"游戏(捉迷藏),这个BUG也是这样,让你的页面内容时隐时现. 关于这个BUG的原文在这里:http:// ...

  2. 浏览器IE6、IE7、IE8、css bug兼容性处理

     1:li边距"无故"增加 1 1:li边距"无故"增加 任何事情都是有原因的,li边距也不例外. 先描述一下具体状况:有些时候li边距会突然增 加很多,值 ...

  3. 【IE6的疯狂之四】IE6文字溢出BUG

    在IE6下使用浮动可能会出现文字重复的情况. 在IE6下,浮动层之间有注释文字的话,之前那个浮动层的内容文字就有可能遭遇一个"隐形"的复制,但是代码里查看文字可并没有多出来. 看个 ...

  4. php bug 管理系统,BugFree(Bug跟踪管理系统) v3.0.3

    BugFree 3.0 在保留 2.x 版本的用户体验基础上进行了完全的重构和重写,重点突出了可配置.可定制和交互性.我们在2.x 版本的兼容和升级上做了大量的工作,但毕竟是一次完全的技术重构,系统稳 ...

  5. 后端拼接html能做判断吗,怎么判断是前端bug还是后端bug?

    在提bug时,只有明确定位是前端bug还是后端bug,才能正确指派给对应的开发同学,如果经常分不清楚,一直需要开发同学重新指派,不仅浪费了时间,还会被开发同学吐槽,今天就带大家解锁一些区分前后端bug ...

  6. 如何区分前端BUG和后端BUG

    1.如何区分前端和后端 通俗讲,用户看到的部分都叫前端. 而用户看不到的部分可以统称为后端. 2.前端和后端的呈现形式 前端的呈现形式有web端.移动端(ios.安卓).小程序等. 后端系统一般只有一 ...

  7. 【判断是前端bug还是后端bug】

    判断是前端bug还是后端bug 一.界面相关,排版错乱,文案错误等问题,大都属于前端bug 1.出现样式的问题基本都是CSS的bug 2.出现文本的问题基本都是html的bug 3.出现交互类的问题基 ...

  8. 软件测试Bug,你是怎么找bug的?bug分析的正确打开方式......

    目录:导读 前言 一. bug详细 二.获取bug具体数据 三.有效的管理bug 四.做好bug分析工作 五.深入bug分析 六.总结 前言 Bug严重级别(Severity,Bug级别):是指因缺陷 ...

  9. 软件测试无效bug分析,(一)Bug不能重现的原因分析及其对策

    摘 要:本文简要分析了无法重现的Bug的可能产生原因,包括环境不一致.缺少最准确的描述和浏览器的不当设置.针对这些原因,本文给出了相应的对策.通过这些措施,可以重现许多以前认为不可重现的Bug. 关键 ...

最新文章

  1. 线程状态以及sleep yield wait join方法
  2. centos安装mysql wsl_如何在 Windows 10 中安装 WSL2 的 Linux 子系统
  3. 洛谷 - P1886 滑动窗口(单调队列/线段树)
  4. memcached 和 redis 的区别与选择
  5. 阿里25k招.NET,要求WPF!
  6. matlab reshape矩阵维度变换
  7. DrawWindowFrame
  8. frameset 的问题与解决
  9. Mac版IntelliJ IDEA上手的一些必要设置
  10. Struts2 中的值栈的理解
  11. mysql migration 使用_DbMigration的使用方法
  12. centos7 yum 配置阿里云镜像
  13. Onvif协议客户端开发(8)--球机云台的控制
  14. [UVA 10635] Prince ans Princess
  15. hdu 2276【Kiki Little Kiki 2】
  16. Linux下使用云笔记及OneNote
  17. 匹兹堡大学申请条件计算机科学,匹兹堡大学计算机科学理学硕士研究生申请要求及申请材料要求清单...
  18. 刷脸支付凭什么这么火 ? 开启你的智慧生活 !
  19. liquibase编写sql脚本
  20. 玩转安卓 Android系统文件夹结构解析(绝对有用)

热门文章

  1. CTex listings宏包出错undefined control sequence,换成verbatim解决问题
  2. Halcon XLD 算子集合
  3. oracle的job引起数据库崩溃,JOB忽然停止工作了
  4. xd使用技巧_adobe xd高级技巧
  5. 〖Python自动化办公篇①〗- 文件自动化管理引言及shutil模块实现文件与文件内容的复制
  6. PAT(甲)1124 Raffle for Weibo Followers——未完成
  7. 【NCRE】---拼接SQL语句(Case....When语句)
  8. 使用python程序抓取天眼查,企查查和爱企查上的企业基本信息
  9. revit怎么上色?教你revit综合工具快速【元素上色】
  10. 《聪明的投资者》摘要——价值投资的起点