IE7
To display CSS for only IE7, you must put all your IE7 styles into a separate style sheet, and use a conditional comment.
The code is:
<!--[if IE 7]><link rel="stylesheet" type="text/css"
href="IE7styles.css" /><![endif]-->
Note: You do not have to duplicate content; IE7 will read both stylesheets, while all other browsers will read just the one.
IE6
Displaying CSS for only IE6 is done in an almost identical way to
the way you would do it for IE7. Once again we use conditional comment.
This time, the code is slightly different, as it is for IE6, not IE7:
The code is:
<!--[if IE 6]><link rel="stylesheet" type="text/css"
href="IE6styles.css"/><![endif]-->
Those are the two main ones you will need to use. As all web
designers will tell you, Firefox and Opera tend to display CSS in the
most correct manner, so any changes you need will be nearly always for
IE6 and/or IE7.