Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jeffx342

macrumors regular
Original poster
Sep 4, 2002
204
0
North Andover
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?
 
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).
 
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.
 
Dreamweaver has a browser check function, so another way to do it (assuming you're using Dreamweaver) is to use the "behaviors" dialog.
 
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...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.