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
Post a Comment