image navigation

liunx

Guest
here (<!-- m --><a class="postlink" href="http://lserv2.dtopinc.com/johnm/css/gpsi/">http://lserv2.dtopinc.com/johnm/css/gpsi/</a><!-- m -->) is the page
Why do I get a quick when you hover the images on the first load of the page? I preloaded the images with javascript and all my <a> tags are styled with css. Any ideas?there is no real way to preload an image, i would suggest using the image replacement technique, example<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
<!--
body {
margin: 0%;
padding: 0%;
}
/*----- structure -----*/
#main {
}
#header {
float: right;
width: 647px;
margin: 0%;
background: url(images/banner.jpg) no-repeat;
text-indent: -700em;
}
#menu {
float: left;
list-style: none;
width: 178px;
margin: 150px 0% 0%;
padding: 0%;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
#content {
float: right;
width: 647px;
padding-left: 10px;
}
/*----- menu links -----*/
#menu a {
display: block;
background-repeat: no-repeat;
text-indent: -700em;
}
#menu a:link,
#menu a:visited {
background-position: 0% 0%;
}
#menu a:hover,
#menu a:active,
#menu a:focus {
background-position: 100% 0%;
}
#menu .home {
height: 30px;
background-image: url(images/home.jpg);
}
#menu .about {
height: 30px;
background-image: url(images/about.jpg);
}
/* etc. */
-->
</style>
</head>
<body>
<div id="main">
<h1 id="header">GPSI</h1>
<ul id="menu">
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#" class="home">home</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#" class="about">about GPSI</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">link</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">link</a></li>
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"#">link</a></li>
</ul>
<div id="content">...</div>
</div>
</body>
</html>then simple merge the hover and regular state images together here is an example i have on my testing server (<!-- m --><a class="postlink" href="http://sk1134.no-ip.org/samples/elite/">http://sk1134.no-ip.org/samples/elite/</a><!-- m -->)
 
Back
Top