Target Mozilla (or Webkit) from CSS

So, I've been working for some time on a site that's supposed to be viewed in Internet Explorer 8.
The site was launched and had great acceptance, but then people started viewing it from Firefox. Not cool!

So I couldn't change the existing styles because that would completely mess the sites design. I needed to target only Mozilla browsers.
I made a quick google search and VOILA!, an answer shone in front of me.

I went to my stylesheet and tried it.

It was THE answer!

Whenever targeting Firefox (or Mozilla browsers), use the following code:

@-moz-document url-prefix() {
#style{
}
}

This works perfectly!
So I had to answer the complete puzzle. What if I wanted Safari or Chrome to behave?
So I found the following piece of code, but haven't had the opportunity to test it: and have already tested it and it works!

@media screen and (-webkit-min-device-pixel-ratio:0) {
#style{
}
}

Hope this helps you sometime.