Fix for IE position fixed
2004-03-16 17:03:28
Hi, after a loooong time of silence due to several reasons, including the working on a version 3, I decided to share with you a minor fix for the known Internet Explorer position:fixed bug. In IE, this CSS rule won't work, and position will not be fixed on screen. There are some other fixes for this problem, using specific CSS hacks, but all of them convert position:absolute to position:fixed (which I found to be a worst problem) or add unnecessary markup. The fix I show you here was made in javascript using very few lines. The only drawback is that you have to be in Quirks mode. Update: no need to now.
Beware if you're using other onload events, since this will overwrite yours. If that is your case, use an event handler to avoid this problem.