1

I have a font that renders certain characters incorrectly on Firefox. I want to change the font to something else if Firefox is detected. I tried this technique:

body:not(:-moz-handler-blocked) .altFont { 
  font-family: helvetica, arial, sans-serifs !important;
}

It didn't work and also on the Firefox site it says it's not recommended. I was wondering if there is any other way to check?

André Dion
  • 21,269
  • 7
  • 56
  • 60
NeedsHelp
  • 427
  • 1
  • 7
  • 24

1 Answers1

2

Use the following syntax to target any version of Firefox Browser:

@-moz-document url-prefix() { 
  /* Styles to be executed on firefox */
  body .altFont {
    font-family: helvetica, arial, sans-serifs !important;
  }
}

Reference: CSS hacks targeting firefox

Saurav Rastogi
  • 9,575
  • 3
  • 29
  • 41