I'm having a problem with a navigation map that uses javascript and CSS to shift a sprite.
The sprite image is located at www.eagleonedims.com/images/navmap.jpg. On each <li> rollover, I need the ENTIRE sprite shifted by 88px to account for the overlapping effect.
The page in question is located at www.eagleonedims.com/index2.php.
If you view this page in IE, the navigation rollover works. However, it does not work in Chrome. I have not tested Firefox. NOTE: I've only setup the HOME button.
Any ideas why it will not work in Chrome? It's frustrating me to say the least. Thanks in advance!
Here's the pertinent code:
HTML HEAD:
<script type="text/javascript">
function changePosition(num)
{
if (num==0){var posy=0}
if (num==1){var posy=-88}
if (num==2){var posy=176}
document.getElementById('navmap').style.backgroundPosition="0 "+posy+"";
}
</script>
HTML BODY:
<div id="navigation">
<ul id="navmap">
<li id="home" onmouseover="changePosition(1)" onmouseout="changePosition(0)"><a href="index2.php">Home</a></li>
<li id="about"><a href="about.php">About</a></li>
<li id="pricing"><a href="pricing.php">Pricing</a></li>
<li id="quote"><a href="quote.php">Quote</a></li>
<li id="contact"><a href="contact.php">Contact</a></li>
<li id="login"><a href="login.php">Login</a></li>
</ul>
</div>
CSS:
#navmap {
width: 1000px;
height: 88px;
background: url("images/navmap.jpg");
margin: 0;
padding: 0;
position: relative;
}
#navmap li {
margin: 0;
padding: 0;
list-style: none;
top: 0;
position: absolute;
}
*#navmap li, #navmap a {
height: 88px;
display: block;
}
#home {left: 141px; width: 110px;}
#about {left: 251px; width: 120px;}
#pricing {left: 371px; width: 120px;}
#quote {left: 491px; width: 120px;}
#contact {left: 611px; width: 120px;}
#login {left: 731px; width: 128px;}