Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello!
Imagine two Photoshop layers, the bottom one has an orange image, and the top one contains a black image. When the mouse is hovering these images, the black image will disappear, and the orange image will appear. I’m looking for a CSS-trick which makes it possible for me to this, but WITHOUT any link-tags.
Thanks in advance,
Kralle
img:hover
I don’t think there’s anything called img:hover?
Thats correct. Don’t ask me why I put that. What you can do is use a:hover and in the HTML put a # symbol in for the link.
I know that. :) But I’m looking for a way to do this without any links.
Stumped
whats wrong with using links?
This sounds like a job for sprites
I’d go with marcdefiants solution indeed. The problem with the :hover pseudo class is that it isn’t supported by IE5/6 on all elements, only on anchor links.
err, there *is* such a thing as img:hover, i don’t know when the last time was i heard that :hover only works on links, that’s only ie5
so img:hover does work?
Yes, it should. The :hover
pseudo class was originally designed for links, but after that, they also made it available to all other elements.
I knew I had read a tutorial saying it worked.
It works, yes, but I believe there is some compatibility issues with earlier versions of IE – you might want to look into that.
ie6 wont do img:hover or button:hover i know that