For css like below could anyone tell me how I can apply css hacks for firefox, ie8, ie7, and ie6?
#category_area {
margin-bottom: 10px;
}
#categorytree ul {
margin: 13px 10px 0px 5px;
}
#categorytree li {
font-size: 13px; font-weight: bold; vertical-align: middle;
}
非常适合您的关于CSS hack的好文章 。
I'm afraid you can't make a common hacked selector for both IE 8-
and FF
.
You can get IE
8 and lower uniquely with the \\9
hack at the end of the settings.
A css hack for FF
would be the @-moz-document url-prefix()
wrapper.
Here's an example.
#category_area {
margin-bottom: 10px\9;
}
#categorytree ul {
margin: 13px 10px 0px 5px\9;
}
@-moz-document url-prefix() {
#category_area {
margin-bottom: 10px;
}
#categorytree ul {
margin: 13px 10px 0px 5px;
}
}
BTW - 5 Reasons to Avoid CSS Hacks and Conditional Stylesheets
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.