I've just learned a very simple CSS trick that allows you assigning different attribute values if the page is rendered by IE. All you need to do is use '#' and '_' prefixes:
.myTestClass{ width: 5px; /* value used by all other browsers */ #width: 7px; /* value used by IE */ _width: 9px; /* value used by IE6 and older */ }
I don't think it's a part of the CSS official specification but it works ;)
I've read that for IE7 an asterisk (*) should be used. You suggest a hash (#). Did you try both characters? Could you say if they both can be used for the same reason?
I've read that for IE7 an asterisk (*) should be used. You suggest a hash (#). Did you try both characters? Could you say if they both can be used for the same reason?
ReplyDeleteI'm referring to this article
I always use * for IE7 (and down), so if you want something different for IE6, you then have to follow that with a line preceded by a "_".
ReplyDeleteIf your code validates as strict doctype you won't need these browser specific "hacks".
ReplyDeleteGoogle "DOCTYPE strict" and "HTML validator."