0

Am looking for styles which affects only to the MAC chrome browser? (MAC chrome and safari will be also fine) Could you any body help me on this?

1 Answers1

0

window.navigator is the simplest way to get information about the user's browser and OS. Basic string search from there to look for OS X. So, using a little Javascript:

var useros = window.navigator.appVersion;
var element = window.getElementById("elementyouwanttostyle");

if (useros.indexOf('OS X') > -1) {
    element.style.color = red;
}

Sources:

https://developer.mozilla.org/en-US/docs/Web/API/Navigator

kyleburke
  • 269
  • 4
  • 8