max-width in IE. It involves the use of Microsoft's Dynamic Properties.The first time I tried this, it crashed my browser. A friend had the same result. Next time I tried it, all was well - but I still feel like I must tread lightly with this code, and routinely whisper sweet nothings in its ear.
While reading the MSDN page about Dynamic Properties, I had to wonder... why did they bother with all that nonsense, when they could've just followed the CSS spec?
Of course, with IE 7, that's exactly what they've done (to a point), so this proprietary hodgepodge will soon be moot. But in the meantime - and for several years to come, because let's be honest, few sites are going to cut off support for IE 6 right away - this is your solution. That is, unless it crashes your browser.








1. Just curious, was it my test page that crashed your browser? I haven't had any problems with the test page (tested on 3 different WinXP boxes), although I have seen other implementations go haywire. One thing to be aware of is that the expression is only for strict mode - transitional doctypes will put IE in quirks mode, which uses a different box model and would require different compensations for margins, padding, and borders.
I'd love to nail down the crash bug you referred to, so if you can provide clues as to OS version, browser version, and other conditions required to replicate the issue, I'd greatly appreciate it.
Posted at 8:51AM on Jul 4th 2006 by Tom Lee