Setting position: relative on html and body in strict mode

Atom RSS

This site heavily relies on bug reports created by its readers. Anyone can report a bug and be published.

Main navigation:




Search reports by browser:

In Internet Explorer 6.0 and higher, setting html, body {position: relative;} while in strict mode causes the browser to disallow scrolling. I don't know of any real-world applications where this would be a problem, but it's still a bug.

In Safari the entire body disappears if you set position: relative on the HTML first, and then on the BODY. Safari crashes if you check BODY, then HTML, then uncheck BODY.

Workarounds include using quirks mode, or playing it safe and avoiding setting positioning to the html element.

Test page Workaround is included
Reported by: John Hansen.

Explorer 5-6 Windows, Safari | Reported on 20 July 2005.

Comments

(Add your own)

Posted by Ingo Chao on 30 July 2005

1

Another workaround would let the content gain layout:

p {zoom:1} in your example,
or more general,
.pagewrapper {zoom:1}.


Post a comment

Commenting guidelines:

  1. When quoting specs, articles or your own research, please include a URL of the document.
  2. Test your stuff. When reporting browser behaviour, make sure that your report is correct.

Yes