Is it a bug that Firefox doesn’t seem to support background-image swapping in pseudo-classes or is it that the other browsers are doing more than they should be?
I’m trying to figure out if I’m doing something wrong… this works in Opera and Chrome (haven’t tested in IE yet)…
.myClass{
background-image:url('off.jpg');
}
.myClass:hover{
background-image:url('on.jpg');
}
However firefox just ignores this. I was hoping to avoid writing a javascript roll-over… this seemed like such an elegant solution, but I’m starting to suspect that I’m hosed.
Your page is in quirks mode, presumably, and
:hoverhas some weird behavior in terms of when it applies or not in quirks mode. I suggest putting your web page in standards mode if you want browsers to actually behave compatibly on it, instead of explicitly asking them for buggy backwards-compatible behavior.