WordPress.org

Ready to get started?Download WordPress

Forums

Need CSS to target Safari for Mac (4 posts)

  1. aoassist
    Member
    Posted 2 years ago #

    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/

  2. xclamation
    Member
    Posted 2 years ago #

    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)

  3. aoassist
    Member
    Posted 2 years ago #

    How do I implement the Javascript or PHP?

  4. xclamation
    Member
    Posted 2 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.