I have a CSS class defined, call it:
<style type="text/css">
.Foo { position: fixed; left: 50px; top: 50px; }
</style>
where I position an element on the screen absolutely.  Throughout my web page's execution, I create and delete many elements and give them class Foo.  When I resize the browser, I want to change the left and top values on the Foo class so the position of all Foo elements is changed as a result of a calculation.
I don't want to simply change stylesheets, I want to calculate a value and make all current and future Foo elements have that new calculated left and top value.
This site has an example, but the code's quite complex. http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
Is there a good, clean way to basically programmatically alter what Foo is defined as?
Thanks!
 
     
     
    