It is necessary for a particular class to add margin-left if opened in Mozilla Firefox browser. I write this:

var sBrowser, sUsrAg = navigator.userAgent; if (sUsrAg.indexOf("Firefox") > -1) { sBrowser = "Mozilla Firefox"; $(".prof-moz-margin-left").css("margin-left") = "20px"; } 

if I write alert () in a condition, it works, but css is not substituted

  • $ (". prof-moz-margin-left"). css ({"margin-left": "20px"}) - user33274
  • @Tchort seems to be the time when it is necessary to define a browser, so that each of them to throw up their styles has already passed. Are you sure you need to do this? - Sasha Omelchenko
  • one
    @SashaOmelchenko Yes, I found a way out of the situation, indicated in the 1.8em styles, all the browsers ate - Tchort

0