Should you use JavaScript or CSS
alexsblog.org
alexsblog.org
My thinking with the above is that CSS code paths in the browser are (with a very few exceptions) going to be a lot faster than trying to do the same in JS, and you don't have to wire up e.g. onresize handlers yourself.
Some things I'll just ignore; if your browser doesn't support border-radius or text-shadow, you get square corners and flat text; if your browser doesn't support box-sizing, the layout will be wrong but at least everything will still be visible.