weird behaviour with scrollWidth property
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't
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.
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.
Any idea why scrollWidth seems to be evaluated over and over where scrollHeight does not?