BennetRight,
Why would there be a need to detect the user's user-agent?
The right approach is to code the page using CSS with well-laid codes, and if possible validated by W3C.
If there are problems on IE, which normally happens, we need first to know what the problem is, and if there is no "valid/standard" fix, then hack, via CSS:
Code:
<!--[if IE]>
<style type="text/css">
#element{property:value;}
</style>
<![endif]-->
Always keep in mind that JS could be disabled, and according to the stats, 20% of users disables JS.
You should cater the page to all, not only to those who have JS enabled.
Hope that makes sense to you.
Just my 2 cents worth. Hope to hear more of your thoughts.