On 2004-02-04 15:15:29 -0800, "CiRcUiT" <jcodlingATjcodlingDOTcom> said:
> I have been trying to figure out how to have a graphic on my
> main site to show my home server status for the people who
> use my voice and other server applications that I run on it.
>
> I tried making an image of an "online" graphic with a
> background of an "offline" graphic and putting the "online"
> graphic on my home html server and it sort of works but if
> the server is offline the graphic is shown as broken. The
> broken icon blocks the "offline" graphic so...
>
> Is there some easier way to do this kind of thing?
Take your current solution one step further, and put both images in the
background of divs. Place the online div over the offline div. then if the
online image isn't available, the offline image will show through (assuming
a 50 by 50 image):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Untitled</title>
<style type="text/css" media="screen">
#online
{
background-image: url(
http://www.your-server.com/online.jpg);
height: 50px;
width: 50px;
}
#offline
{
background-image: url(offline.jpg);
height: 50px;
width: 50px;
}
</style>
</head>
<body>
<div id="offline"><div id="online"></div></div>
</body>
</html>
Only tested in one browser, but it seems to work just fine.
Ethan
--
Datarealm Internet Services, Inc.
Shared Hosting:
http://www.serve.com
Dedicated Hosting:
http://www.rackmounted.com