1

I'm editing an image slider and inside its CSS file I found *display:inline;.

What means the * in that position?

I tried to look into google but I didn't find anything.

Thank you.

MDP
  • 4,177
  • 21
  • 63
  • 119
  • 2
    That is some IE hack (which version I don't remember). – Harry Jan 18 '16 at 08:11
  • 1
    1 min Google search gives me [this](http://stackoverflow.com/questions/4563651/what-does-an-asterisk-do-in-a-css-property-name) – Audite Marlow Jan 18 '16 at 08:13
  • Thank you. In fact I have IE11 and if I turn *display:inline into display:inline it stops working correctly – MDP Jan 18 '16 at 08:13

1 Answers1

3

http://www.javascriptkit.com/dhtmltutors/csshacks3.shtml

*property: value

Although Internet Explorer 7 corrected its behavior when a property name is prefixed with an underscore or a hyphen, other non-alphanumeric character prefixes are treated as they were in IE6. Therefore, if you add a non-alphanumeric character such as an asterisk (*) immediately before a property name, the property will be applied in IE and not in other browsers. Unlike with the hyphen and underscore method, the CSS specification makes no reservations for the asterisk as a prefix, so use of this hack could result in unexpected behavior as the CSS specifications evolve.

*property: value applies the property value in IE 7 and below. It may or may not work in future versions. Warning: this uses invalid CSS.

This is an obsolete CSS hack that is not needed anymore as IE6 and IE7 usage has (finally) dropped below any measurable number.

Community
  • 1
  • 1
Dai
  • 141,631
  • 28
  • 261
  • 374