SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to change font ONLY if using Mozilla Firefox

    Hi there,

    I have created my online portfolio using a Tumblr theme here: www.ellekorhaliller.co.uk

    As you can see it uses an font that works in every browser apart from Mozilla because it is externally hosted and I do not own the font myself.

    I would like to create a statement that changes the font IF the browser is Mozilla.. Like the <!--if IE statements but I know these are IE specific.

    I want to make sure that my code can determine if the user is using Mozilla and if so I want to then use a Google Web Font.

    Any help would be much appreciated.

    Best,

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Can you not just use a font stack and put the back-up font second in the list? That way any browsers that can use the first font will do so, and any that can't will move on to the second one.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,317
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Do you have access to the CSS on the original site? If so, as Stevie says, add fallback fonts in you style sheet. E.g.

    Code:
    body {
    background-color:#ffffff;
    font-family:'BrownBold', 'century gothic', callibri, arial, helvetica, sans-serif;
    color:#000000;
    font-size:17px;
    line-height:25px;
    }
    Those are just random fonts I typed, and it would be better to identify common fonts that people have on their computer that look more like BrownBold.

    It's a real pain the FF often chokes on FontSquirrel fonts. We get a lot of threads here about that.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •