javascript - Background image disappears when changing its background-position? -
okay have list of links, so
<ul> <li>item1</li> <li>item2</li> <li>item3</li> </ul>
and have 340x40 (340 length) image want appear below list item hover on list items. tried this
li:hover { background: url(../images/lihover.png); }
when this, image appears right on top of list item, not below it. tried adding
background-position: 0px 5px; repeat: no-repeat;
this gave problem. if image appeared after hovering on item in imaginary container 340x40. , when told move 5px down using background-position, it's if image move down except container image in did not move down. can see image if inside imaginary container, , imaginary container down not move down 5px, image does, 5px of image disappears. removed
repeat: no-repeat;
and version of image starts appear when move image 5px down using background-position in css. can see bottom 5px of new image , top 335px of old image. why happening , how fix it?
op looking needed added height
here link jsfiddle http://jsfiddle.net/ddcxb/1/ tell me if looking for.
Comments
Post a Comment