Making a web site

Discussion in 'General Mac Discussion' started by Jeffx342, Jan 12, 2004.

  1. Jeffx342 macrumors regular

    Joined:
    Sep 4, 2002
    Location:
    North Andover
    #1
    I am making a web site, but I remember seeing "welcome safari users" only the people using safari can see it how do put this on my web page?
     
  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    Do you know HTML?

    If you don't know HTML yet, I would suggest that you learn. HTML documentation is located here. What you need to do is use an <IMG> tag to embed the image in your web page(s), pointing the src parameter at the location of the image (avoid loading images located offsite if at all possible/save images you want to use to your website's directory - it's faster that way).
     
  3. wordmunger macrumors 603

    wordmunger

    Joined:
    Sep 3, 2003
    Location:
    North Carolina
    #3
    I think what you're looking for is a browser check script. Here's a pretty good page describing how to do it.
     
  4. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #4
    Actually, he's asking how to make it so that image is only visible to Safari users.

    ...which requires some scripting (something called a "browser detection script" to be precice). Do a google search and you should come up with lots of examples.
     
  5. wordmunger macrumors 603

    wordmunger

    Joined:
    Sep 3, 2003
    Location:
    North Carolina
    #5
    Dreamweaver has a browser check function, so another way to do it (assuming you're using Dreamweaver) is to use the "behaviors" dialog.
     
  6. michaelrjohnson macrumors 68020

    Joined:
    Aug 9, 2000
    Location:
    54140
  7. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #7
    Code:
      <script type = "JavaScript">
    var SafariMessage ="Welcome Safari User!"
    var NoSafariMessage = "you evil non-Safari user !!!!"
    if (navigator.userAgent.indexOf('Safari') != -1) {
    document.write(SafariMessage);
    } else {
    document.write(NoSafariMessage);
    }
    </script>
    something like that...should work for images too...
     
  8. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #8
    that script works

    http://ducktapeandglue.no-ip.org

    only works to shows in safari, no one sees the evil part though. Only seemed to work in IE under the mac, i don't think it shows on PCs
     

Share This Page