Msg#: 4336292 posted 11:25 am on Jul 7, 2011 (gmt 0)
I don't know how much use this will be to people, but just in case...
If you've struggled with CSS expressions to force IE5/6 to respect max-width, no doubt many of you will have resorted to hooking the onresize() event.
The problem is, IE5 and 6 (Windows) fires both window.onresize() and document.body.onresize() whenever you resize the browser window. This can result in ugly flickering at best. At worst (if you're doing more than just max-width trickery), all sorts of horrible things can happen.
I've seen a number of 'solutions' involving using global variables to keep track of the window's old size, and comparing them to the new size, to decide whether or not to call your custom onresize() function.
This is nonsense. Iv'e found it's far simpler to stick this in a conditionally-commented script at the bottom of your <body>: