Hi I've come across the following code: .height480{ min-height:484px; min-height:497px\9;}
I've never seen the backslash before. I've checked the W3c documentation for min-height and there's no mention of it. Anyone know anything about it? I've noticed that firefox ignores it, so guess it might just be a typo? Cheers Dewd
Asked
Active
Viewed 341 times
0

dewd
- 4,380
- 3
- 29
- 43
-
@BoltClock. Thanks for identifying this as dupe. A google search for css \ didn't bring up the dupe question, neither did the answer suggestions when I was writing the question. At the time, I wasn't aware of the significance of the number 9. Most numbers in css are arbitrary. – dewd Oct 08 '13 at 09:43
1 Answers
1
Its a IE hack
The first min-height
work for other browser and next min-height with slash
will work for IE7, IE8, and IE9
.header {width:300px;height:200px;background:#000;} /* Applies to all browsers */
*.header {width:310px;height:200px;background:#000;} /* Applies to all IE browsers */
_.header {width:290px;height:200px;background:#000;} /* Applies to all IE browsers 6 and below */
.header {width /*\**/:330px\9;height:200px;background:#000;} /* Applies to IE 8 */
(Note: IE 8 and IE9 are a diffent animals, it is tying to act like web-kit. A tip of the hat to Safari and Crome.)

Bhojendra Rauniyar
- 83,432
- 35
- 168
- 231
-
1could you advise specifically what the \9 does? is it stating apply to earlier than IE9? as in \8 would be earlier than IE8? or am I misunderstanding? – dewd Oct 08 '13 at 09:33