开发者

CSS selector for Firefox 3 that excludes Firefox 3.6

开发者 https://www.devze.com 2022-12-20 23:35 出处:网络
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 {

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消