javascript - changing position of background image which appears after a hover html/css -
edit: background-position change position of background image. realized actual problem facing else, can seen on thread: background image disappears when changing background-position?
okay have set of links (a href's) inside unordered list, , when user hovers on them, want black background image show on top of link , change links color black. have background image shows photoshoped. here did far
li:hover { color: white; background: url(../images/lihover.png); }
now, problem image doesn't show want show. want link in center of image. image 3 pixels below want be. same ever link hover over, image 3 pixels below want be. there way change position of image shows , way move image few pixels above supposed be? (even if cannot css, if can write javascript function can accomplished, great).
the list
<ul> <li>item1</li> <li>item2</li> <li>item3</li> </ul>
i think mean:
li:hover { color: white; background: url(../images/lihover.png) no-repeat center center; }
if doesn't center way want, play center center
values x / y (horizontal / vertical). can px,em or % values.
Comments
Post a Comment