While reading the CSS code of Twitter bootstrap, I noticed that some elements have a CSS rules with a * at the beginning. For example:
.row-fluid {
width: 100%;
*zoom: 1;
}
Why is this technique being used?
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.
Ignore posts about
*being an “everything” selector, as it is, but that isn’t what it is in this case.Putting
*before an attribute allows you to target ie7 and below. This is an old hack that shouldn’t really be used as you can target ie7 and below in better ways.Quick explanation of how to target older IE versions. If you read to the bottom you will see he explains that it is better to use conditional comments than hacks, as they are after all, hacks.