I've been asked to include a floating menu on a client's website and have adapted an old script I found.
My problem is that, in IE6 and Netscape 6, the menu does not float when the page is scrolled. However, in IE5.x and Opera 7 it works fine. To add to the mix, when I tried to simplify the XHTML page to use in this posting, the simplified example fixed the problem.
I've already overspent significantly on this project and would appreciate it if anyone can shed any light on the probable cause of this problem, or if anyone has an academic interest in solving it via the usual arduous method...
Thanks for your reply. That's actually the script that I used as inspiration for my (clearly flawed) attempt. I want the script to be entirely contained in an external script file. Do you think that may be the cause of my problem? Then again, if that were the case, why would it work at all (even in the simplified version)?
I'm not concerned about support for browsers going back as far as NN4. IMO any remaining users should be dragged kicking and screaming into the 21st century where we have standards (at least of a sort!) :-)
I haven't used the script itself but it contains the solution to the IE6 problem, i.e. use document.documentElement.scrollTop instead of document.body.scrollTop. My script still doesn't work with NN6, but I can live with that. Any further pointers appreciated, however.