What is the meaning of this? I am guessing it is a browser hack, but I have not been able to find what exactly it does.
width: 500px\9;
What is the significance of \9?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
\9is a “CSS hack” specific to Internet Explorer 7, 8, & 9.This simply means that the one specific line of CSS ending with a
\9;in place of the;is only valid in IE 7, 8, & 9.In your example,
width: 500px\9;means that a width of 500 pixels (same result aswidth: 500px;) will only be applied while using IE 7, 8, & 9.All other browsers will ignore
width: 500px\9;entirely, and therefore not applywidth: 500px;to the element at all.If your CSS looked like this…
The result would be
#myElement500 pixels wide in IE 7, 8, & 9, while in all other browsers,#myElementwould be 300 pixels wide.More info
EDIT:
This answer was written in 2011. It should now be noted that this hack also works in IE 10.