I'm trying to use IE expressions within a CSS file to simulate the unsupported min-width property
To do the same for min-height, the following works fine
I would think that this should work fine as well, but it doesn'tCode:height: expression( this.scrollHeight < 300 ? "300px" : "auto");
Instead, it freezes the browser and sends the CPU usage through the roof as if there was an infinite loop defined.Code:width: expression( this.scrollWidth < 300 ? "300px" : "auto" );
To troubleshoot, I tried this:
I would expect that a value would be alerted once. Instead, it alerts twice when the page loads and then 2 more times every time I move my mouse over the element I'm applying this style to.Code:width: expression(alert(this.scrollWidth));
Any idea why scrollWidth seems to be evaluated over and over where scrollHeight does not?






Bookmarks