4

Just stumbled upon this in a borrowed css file - something I've never noticed before, and punctuation in context is inherently hard to google:

.ez-radio { zoom: 1; *display:inline; _height:15px; }

What's the '*' prefix do?

And for the matter the underscore in _height?

Is this some new CSS3 trickery?

jenson-button-event
  • 18,101
  • 11
  • 89
  • 155

3 Answers3

10

It's used for CSS hacks in Internet Explorer.

* is IE 6 - 7 only (thank you, mck89!)

_ is IE 6 and below.

Don't use them. If you need browser specific CSS definitions, use specialized CSS definitions instead.

Leonard
  • 3,012
  • 2
  • 31
  • 52
1

Those symbols are used to target IE lower version browsers called it CSS HACKS. FF, Chrome or Safari always ignored those strings in CSS class.

Sudip Pal
  • 2,041
  • 1
  • 13
  • 16
0

dont want to duplicate Zanathel's answer, but its important to mention:

  1. please do not use them in your stylesheet, keep it hack-free
  2. when you need to use hacks, dont use hacks, use conditional comments, and place your ie specific css in these files
Mark
  • 6,762
  • 1
  • 33
  • 50