0

Possible Duplicate:
What does a star-preceded property mean in CSS?

I downloaded CSS file for one of jQuery scripts and it look like this

.usual div {
  *margin-top:-15px;
  clear:left;
  background:snow;
  font:10pt Georgia;
}

what is the use of star sign?

Community
  • 1
  • 1
Poemm
  • 109
  • 2
  • 6
  • @Seth just in case you still do that: do NOT edit possible duplicates into question body. The system is doing it by itself when a question is actually closed. – Shadow The GPT Wizard Apr 06 '14 at 14:39

2 Answers2

3

This is a hack for IE7 and under. Only those browsers will respond to the CSS rule, as it's considered invalid to all other browsers.

mopsled
  • 8,445
  • 1
  • 38
  • 40
1

It's a hack to, in this case, change positioning in certain versions of IE.

The CSS standard says to ignore properties whose names are preceded with some character, but some versions of Internet Explorer ignore this. Some you might see are:

  • *someproperty: somevalue - IE7 and earlier affected
  • _someproperty: somevalue - IE6 and earlier affected
  • #someproperty: somevalue - I forget. Probably the same effect as *.

You should probably use conditional comments instead, however.

Ry-
  • 218,210
  • 55
  • 464
  • 476