I’m using the following code to have a non-JS navigation:
<ol id='navigation'> <li id='home'><a href='#'><img src='./images/nav/home-hover.png' alt='Home' /></li> ... </ol>
And the CSS:
#navigation a { display: block; height: 25px; } #navigation a img { display: none; } #navigation a:hover img { display: block; } #home a { background: url('./images/nav/home-normal.png') no-repeat; width: 100px; }
My problem is they won’t change images on hover in IE6. I’m using the :hover on an anchor so that should be fine and am using display rather than visibility which is another thing that doesn’t work in IE6.
I’d really like not having to add a load of javascript for image replacing/preloading (embedding something like jQuery isn’t an option) – can anyone help me here?
Thanks,
IE doesn’t repaint anchors unless any rule on
<a>itself changes. Add anything fora:hover, e.g.:BTW: unfortunately popular screen readers don’t read things with
display:none, so your menu ends up being inaccessible.I suggest having
<img>visible by default, and hiding it on hover.