Support » Themes and Templates » Need CSS to target Safari for Mac

  • aoassist

    (@aoassist)


    Hello,

    I have a pretty simple question. I am working on a site. And I positioned the copyright line on the bottom of each page. It displays correctly in IE, Firefox, Safari on PC, Chrome. But it’s not aligned correctly on Safari for Mac. How do I get a specific line of CSS just to target Safari for Mac only?? Thank You.

    Site: http://dev.andreamarymarshall.com/about/

Viewing 3 replies - 1 through 3 (of 3 total)
  • xclamation

    (@xclamation)

    Hi,

    You cannot target specific systems/browsers with CSS alone. For this you would need JavaScript or PHP to detect them and then load the corresponding CSS file.

    Try enclosing your copyright <span> in <p> tags, or even better, re-write it like below:

    <p class="terms">© 2012 Andrea Mary Marshall</p>

    and change the following line in your style.css file:

    from:
    #simple_footer_nav .terms { float:right; margin-top:10px; }

    to:
    p.terms { text-align:right; margin-top:10px; }
    (you might not need the margin-top now also)

    aoassist

    (@aoassist)

    How do I implement the Javascript or PHP?

    xclamation

    (@xclamation)

    There are browser specific libraries already out there if you look on Google.

    Not sure if you missed the point in my post though, in that the problem is because you have incorrectly used HTML (<span> should be used inside <p> tags) and this is not being interpreted correctly by Mac Safari.

    Using the above code should fix your issue. Have you tried it yet?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need CSS to target Safari for Mac’ is closed to new replies.