This thread has been split off of the thread about how to align a table in the middle of the page.
@David Laakso:
I finished reading the article and it made me look into using expressions in CSS. Although the author's solution was pretty neat I'm going to avoid using it. There are a few reasons for this decision:
The first reason is because expressions are proprietary to Internet Explorer and so they are not going to work in other browsers.
The second reason is because expressions were made available in IE5 but are no longer supported in IE8. One of the nice things about IE8 is that they are trying to become more standards complaint; but this means that stuff like expressions had to go.
Another reason is because I'd be combining JavaScript into my CSS styles. This could possibly open the website to a cross site scripting attack which may be over looked.
Also, expressions evaluation has a high runtime cost. Apparently they evaluated when the page is rendered, resized, when the page is scrolled, and even when the user moves the mouse over the page!
I'm glad that you opened my eyes to the possibility of dynamic CSS solutions; however, I'm going to stay away from using CSS expressions.
Thanks!
-Frinny