I'm no expert at CSS (and I have done quite a bit of research on this) so posting here to see if I can't pick up an idea or two (thanks in advance).
I am running a CSS menu system with the following code:
The menu behaves well. What I would like to accomplish is a simple image reversal on mouse-over. When I change the #nav li a:hover part of the code as follows:
..I can see the image on mouse over but the image is staying just to the right of the original image. Not having any luck making it appear as a swapping of images.
You can see this effect on this page (look under "Primary References" for the effect - just mouse over a menu item). The hover image appears but just off to the right of the original. thanks.
I am running a CSS menu system with the following code:
Code:
/*----- MENU CSS
------------------------------------*/
#nav, #nav ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
float : left;
width : 11em;
border :0;
}
#nav li { /* all list items */
background:url("[URL unfurl="true"]http://www.blogblog.com/rounders3/icon_arrow_sm.gif")[/URL] no-repeat 2px .25em;
position : relative;
float : left;
line-height : 1.25em;
margin-bottom : 0;
width: 11em;
border :0;
}
#nav li ul { /* second-level lists */
position : absolute;
left: -999em;
margin-left : -13.3em;
margin-top : -1em;
border-bottom:0px dotted #345;
line-height:1.4em;
background:#234;
}
#nav li ul ul { /* third-and-above-level lists */
left: -999em;
margin-left : -13.3em;
margin-top : -1em;
background:#234;
}
#nav li a {
width: 11em;
display : block;
color : #CCCC99;
text-decoration : none;
background:#234;
padding : 0 0.5em;
}
#nav li a:hover {
color : #00FFFF;
background:#234
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
left: -999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul {
left: auto;
}
Code:
From..
#nav li a:hover {
color : #00FFFF;
background:#234
..to..
#nav li a:hover {
color : #00FFFF;
background:url("[URL unfurl="true"]http://www.abc.com/myimages/imageA.jpg")[/URL] no-repeat 2px .25em;
You can see this effect on this page (look under "Primary References" for the effect - just mouse over a menu item). The hover image appears but just off to the right of the original. thanks.