5

I want to add a specific style to my page but only on firefox running on a pc. I use this code to target just mac but what would be the windows equivalent? and Is there a way to do it with just media querys not javascript?

var FF = !(window.mozInnerScreenX == null);

if(FF) {
    if(navigator.platform.indexOf('Mac')>=0)
         {
            // is a mac and on firefox
         }
nick
  • 1,226
  • 3
  • 21
  • 38
  • What style do you want to add? – misterManSam Aug 12 '14 at 16:01
  • possible duplicate of [Targeting only Firefox with CSS](http://stackoverflow.com/questions/952861/targeting-only-firefox-with-css) – Paulie_D Aug 12 '14 at 16:02
  • Id like to hid a video tag but only on firefox-pc, it runs slow on pc but on my mac it plays fine. – nick Aug 12 '14 at 16:04
  • 1
    Check this one out http://stackoverflow.com/questions/952861/targeting-only-firefox-with-css – Benjamin Aug 12 '14 at 16:16
  • 1
    You could ask a question about why your video runs slow in Firefox on PC :) – misterManSam Aug 12 '14 at 17:09
  • @misterManSam do you know why thou? lol if you go to http://dfcb.github.io/BigVideo.js/ you will notice that this plugin works fine on everything but firfox pc, any ideas why? – nick Aug 13 '14 at 16:22

2 Answers2

8

Css hack for firefox

@-moz-document url-prefix() { 
  .cssSelector {
     font-size: 14px;
  }
}

Reference

Benjamin
  • 2,612
  • 2
  • 20
  • 32
1

MDN Mozilla CSS Extension you can read all possible CSS extensions for mozilla also you can check this answer

Community
  • 1
  • 1
oqx
  • 2,157
  • 17
  • 27