Hey,
I've just written my first sprite and it doesn't work. It's just one image used as a link button with a "hover" state that glows. It will link to the page it's supposed to, but doesn't show the hover image. The image is 160px x 68px ( the total jpg image is 160px x 138px... double the height to allow the shift to the "hover" image )
I need help. Below is the html code and the css style sheet.
Any suggestions would be appreciated.
Thanks,
B.
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>TEST SPLAT PAGE</title>
<link href="STYLES/splattest.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--start header-->
<div id="splat">
<ul>
<li class="logo"><a href="index.html"></a></li>
</ul>
</div>
</body>
</html>
@charset "UTF-8";
* {
margin:0; padding:0;}
#splat {
width:160px;
height:68px;
position:relative;
background: url(../images/splatforsprite.jpg);
margin:0;
padding:0;
}
#splat li {
float:left;
}
#splat li a {
position:absolute;
top:0;
margin:0;
padding:0;
display:block;
height:68px;
background:url(../images/splatforsprite.jpg) no-repeat;
text-indent:-9999px;
overflow:hidden;
font-size: 1px;
}
li.logo a {
left:0;
width:160px;
background-position:0 0;
}
li.logo a:hover {
background-position: 0 -68px;
}