Css – Hack padding-right for IE 7

cssinternet-explorer

I want to put padding-right:10px to my style for only IE , but I don't want other browsers to render this padding. Any solution to define padding only for IE, but protected from Firefox, chrome, and others?

Best Solution

Use conditional comments.

Edit: If you really really want to hack the CSS - which you shouldn't - use

* + HTML .myClass {}

Which will target IE7 (I don't know how this works with IE8 in either mode - so please don't do it.)