Today I found a great approach for defining Mozilla specific styles without using Mozilla CSS extentions. The only thing needed is to put all Mozilla specific CSS definitions in a “@-moz-document” block and specify the url, url-prefix or domain to which pages the styles have to be applied:
@-moz-document url(http://www.w3.org/),
url-prefix(http://www.w3.org/Style/),
domain(mozilla.org)
{
/* CSS rules here apply to:
+ The page "http://www.w3.org/".
+ Any page whose URL begins with "http://www.w3.org/Style/"
+ Any page whose URL's host is "mozilla.org" or ends with
".mozilla.org"
*/
body { ... }
}
Browser compatibility
Available since Mozilla 1.8 / Firefox 1.5.
You can read more about this on Mozilla developer center website.
Now go and learn more about Mozilla CSS extentions.
extensions, Mozilla styles







And this code is valid CSS?
http://jigsaw.w3.org/css-validator/
It is not, but it’s a good solution when there’s no other way to achieve particular goal.
Everyone has the opportunity to make the choice: poor design in Firefox or valid CSS.
well my site uses various browsers and is being decorated using a lot of css, infact 12 css per page. now some css works fine in ie 6 but not in mozilla, so i wanted to jnw if you know any mozilla speciic css tags, i know one ie HTML > BODY , but the problem with this one is that, both IE 7 and mozilla recognises that , but not IE6, i want only for mozilla.
Have you tried Mozilla CSS Extensions?