What does an asterisk do in a CSS property name?

It's an IE hack. The second declaration will be applied by IE7 and older (thus overriding the first declaration), while other browsers will ignore it and continue applying the first declaration instead.

Also, this is invalid CSS syntax.


It is a syntax error. So in CSS, it makes the property name invalid and stops it being parsed.

Thanks to bugs in browsers, it is sometimes ignored. This effectively causes the property to apply only to browsers featuring that particular bug — IE7.

In general, it should be avoided in favour of conditional comments.


its like the underscore for ie6. but for ie7

if you put the asterisk the property will only be used in ie7 and older browsers.

its an hack...

Tags:

Css