I would like to solve this problem only using CSS and HTML for the moment, as I don't know JavaScript or jQuery yet.
So I have this hyperlink-image that changes (it glows) when I hover on it in Chrome, but it doesn't work in Internet Explorer and Firefox. (Internet Explorer version:11, Firefox version: 26.0)
I read that Internet Explorer recognizes only "anchors", but I don't have any clue how to put the hover in the <a> tab, as the CSS page is separated from the HTML one. I also tried to do write a#x{...}, but it doesn't work.
HTML:
<a href="http://www.google.com">
<img id="x" style="position:absolute; top:300px; left:950px;"
src="images/x.png"/>
</a>
CSS:
#x{
width:188px;
height:253px;
}
#x:hover{
content: url(images/xhover.png);
width:188px;
height:253px;
}
I tried to change content
to background-image
, but the result is that the hover image is in the original size and its height and width won't be modified, and it stays on the background, so the first image won't overlap it...
I tried to check other posts, but I couldn't find the right solution for me...