Div with image clickable and with hover

Question!

I want to add a clickable image in my html page, with opacity and when I hover with my mouse over the image, the opacity has to change to 0. (with a: hover)

I tried different methods, but not one works..

Can anyone give me the code?

I found out how to fix the problem:

<html>
<div id="yourdiv">
<a href="#">
<img src="images/yourimage.png" width="20" height="20" alt="..." />
</a>
</div>

</html>

<style>
#yourdiv img{
opacity:0.5;
filter:alpha(opacity=50); /* For IE8 and earlier */
}

#yourdiv img:hover{
opacity:1.0;
filter:alpha(opacity=100); /* For IE8 and earlier */
}

</style>


Answers

Have you tried at least googling your issue? Doesn't seem so...

http://www.webdesign.org/html-and-css/tutorials/images-with-hover-effects.9130.html

By : Matteo


This video can help you solving your question :)
By: admin