Shurvir Mori Shurvir Mori - 1 year ago 60
CSS Question

how can I give different css for safari browser

I wanna give different css for safari. Because my code works perfect in chrome and Firefox. But it destroy the structure in safari. so, I want to give different stylesheet for safari.
I already tried,

margin: 0px 10px 0px 0px /* Safari */;
margin: 0px 10px 0px 20px /* chrome */;

This is just one example, but there are so many things, which break in safari.

Answer Source

I agree rajveer mori, try this code

     <script src=""></script>
        <style type="text/css">audio {display: none;}</style>
    <ul id="nav-two" class="nav">
            <a href="#">Home</a>
            <audio id="sound" controls preload="auto"><source src="" controls></source></audio>
        <li><a href="#">About</a></li>
        <li><a href="#">Clients</a></li>
        <li><a href="#">Contact Us</a></li>
    $("#nav-two a")
      .each(function(i) {
        if (i != 0) {
            .attr("id", "sound" + i)
        $(this).data("beep", i);
      .mouseenter(function() {
        $("#sound" + $(this).data("beep"))[0].play();
    $("#sound").attr("id", "sound0");