0

I'm looking for a Firefox 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.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Parrfolio
  • 157
  • 1
  • 4
  • 9

3 Answers3

1

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.

akiller
  • 2,462
  • 22
  • 30
0
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.

TylerH
  • 20,799
  • 66
  • 75
  • 101
0

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

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265