Forum Moderators: not2easy
After successfully solving DIV rendering differences [webmasterworld.com] between IE and Mozilla, I am now confronted with 'the' DIV text selection error in IE6.
It is impossible to accurately select text in any the three DIV boxes my site layout is made of. When selecting text in the large main text box for example, text in other DIVs is also selected. This problem does not occur in Firefox and Mozilla. I read here [webmasterworld.com] this issue is specific to IE6. I tried adding different z-indices to all the elements that are defined in the CSS code, but this doesn't help.
I read a few other solutions on a Dutch site:
1. Removing the Doctype declaration and have the browser run in quirks mode -> unacceptable
2. Use Javascript to serve a IE6 specific stylesheet -> I don't like this
3. Adding the following piece of code to the stylesheet
/* javascript hack for text-selection bug in IE */
height: expression((document.documentElement.scrollHeight - 10) + “px”);
Option 3 makes text selection totally impossible.
How can I allow proper text selection IE6, not using one of the three options above?
For fellow innacurate readers: this bug occurs in IE6 on CSS sites that use absolute positioning. Adding a height property to the body ( body {height:1000px} ) solves it. At least, in my case it did. :)