html - how can I give different css for safari browser -


i wanna give different css safari. because code works perfect in chrome , firefox. destroy structure in safari. so, want give different stylesheet safari. tried,

button{        margin: 0px 10px 0px 0px /* safari */;        margin: 0px 10px 0px 20px /* chrome */; } 

this 1 example, there many things, break in safari.

you can use jquery target safari specifically, , load alternate css or entirely different stylesheet if wish:

if (navigator.useragent.indexof('safari') != -1 && navigator.useragent.indexof('chrome') == -1){    // safari  } else {    // else in other browsers  }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -