a:hover background-postition problem
Posted
by Ryan
on Stack Overflow
See other posts from Stack Overflow
or by Ryan
Published on 2010-04-15T10:36:38Z
Indexed on
2010/04/15
10:53 UTC
Read the original article
Hit count: 328
For some reason, I am not entirely sure why, but the following is not working. The background position simply stays the same on hover. I cannot figure out why. I could do it another way, but I would like to try and get to the bottom of why it does not work.
#nav a:link, #nav a:visited {
background:url(../img/nav-sprite.png) no-repeat;
display:block;
float:left;
height:200px;
padding:10px;
text-indent:-9999px;
border:solid 1px red;
}
#nav a#home {
background-position:-10px 0px;
width:30px;
}
#nav a#about-us {
background-position:-85px 0px;
width:45px;
}
#nav a:hover {
background-position:1px -15px;
}
Does anybody know what could be causing this?
Thanks in advance!
Ryan
© Stack Overflow or respective owner