I'm looking for a Fi开发者_StackOverflowrefox 3 CSS selector that doesn't work in Firefox 3.6.
html>/**/body .blockmeta .date-ui, x:-moz-any-link, x:default {
border:1px solid #ccc;
border-bottom:2px solid #ccc;
background:#f2f2f2;
margin-top:-1px;
}
The code above seems to also work in Firefox 3.6 which is undesirable.
I've not used it, but if you can use JavaScript then CSS Browser Selector looks interesting.
Of course, the better option would be to to not rely on hacks at all. Being pixel perfect doesn't really matter as long as it's still fairly accurate to your original design.
Remember, most people aren't going to be comparing your site in every browser and so won't notice a difference.
Use Mozilla CSS Extensions to add a selector for any Firefox version, then override it with a Firefox 3.6+ filter which resets the values:
/* Any Firefox */
@-moz-document url-prefix()
{
.blockmeta .date-ui { display:none }
}
/* Firefox 3.6+ Filter */
@-moz-document url-prefix()
{
@media -moz-scrollbar-start-backward
{
.blockmeta .date-ui { display: block; }
}
}
References
@-moz-document
@media -moz-scrollbar-start-backward
body, x:-moz-any-link, x:default, x:indeterminate {background:red}
it's not a good hack because as weird as it is, it's messing up with ie7.
精彩评论