i have a navigation menu and i am using the hover element to change the image when an hover event occur. i am using the following CSS
#navigation li.contact a:hover {
margin-left:1px;
background: url('../img/hover.jpg') no-repeat;
float:left;
width:147px;
height:109px;
}
my navigation menu is composed of a pattern stretched using repeat-x properties of css. the above code works perfectly fine. now i want to apply a fadein and fadeout effect on the image that i am using for hover. how do i do it?
You cannot do fade on the background image.
Possible solution is to use a div positioned absolutely for li tag. i.e.:
The css should be like:
This way you can say:
The problem came if you want to position your li elements absolutely some how. I haven’t tested it, but this way it should work.