Home › Forums › CSS › Icon Over IMG on Hover › Re: Icon Over IMG on Hover
August 15, 2010 at 2:40 am
#81593
Kestral
Member
You mean like an overlay image appearing over the img?
Something like this might work:
Code:
<div id="container">
<img src="img.jpg" alt="Image" />
<div></div>
</div>
<img src="img.jpg" alt="Image" />
<div></div>
</div>
Code:
div.container img + div {
display: none;
[... all other styling code ...]
}
display: none;
[... all other styling code ...]
}
div.container img:hover + div {
display: block;
}
div.container div:hover {
display: block;
}
The img will probably have to be a fixed height and width for it to display well. You’ll also need to position the overlay properly.