Very good info here:
So now I took an ‘assistance’ property which is self-overwritable, let this be clear. Watch it, it’s only used as a dummy assistance property. Then set the value of background-position in it, which is not self-overwritable, and lastly overwrote the assistance property. This trick even allows us to avoid function creation:
.elem {
background-position: inherit;
*clear: expression(
style.backgroundPosition = parentNode.style.backgroundPosition,
style.clear = “none”
// debug:
, window.expc = window.expc || 0,
window.defaultStatus = expc++
);
}
This is it. The menu was absolutely responsive. The expression runs only one time. You can experiment, the debug lines show the number of executions in the browser’s status bar. I think it is the recommended way of CSS expression usage with any CSS property, when working around compatibility issues.
It’s important to note that you cannot use the underscore hack (_clear) in case of expressions intented only for IE6, because it will run on IE7 too. In such situations you have to separate it by other ways.
UPDATE
Yet, it’s still not the end, there’s another catch. If you remove the debug lines from the above example, IE gently will hang up. Put a simple value, e.g. a 0 in place of that, and it will work:
.elem {
background-position: inherit;
*clear: expression(
style.backgroundPosition = parentNode.style.backgroundPosition,
style.clear = “none”, 0
);
}
Pasted from <http://vacskamati.blogspot.com/2008/10/one-time-execution-of-ie-css.html>


