Border Around Image (with Caption) Changing on Hover+
Hi,
I would like to put a border around an image that has a caption under it that only lights up on hovering. And also have the caption change colors on hovering.
The border needs to be around the image and caption together.
Emulating what is going on here.
http://www.ideo.com/work/
If you scroll down over the project photos area. Hovering over the image area, including the text "zone", makes a border appear.
So far I have used this CSS styling to add a border and place a caption.
Code:
.project-image {
float: left;
padding: 5px;
border: 1px solid #fff;
margin: 5px;
}
.project-image p {
margin-top: -5px;
text-align: right;
font-style: italic;
text-indent: 0;
font-weight:700;
}
HTML:
Code:
<div class="project-image">
<img src="somephoto.jpg" alt="somephoto" width="200" height="100">
<p>photo caption</p>
</div>
I tried, in error, to make styles for .project-image a / .project-image a:hover, but they didn't work at all.
I need to mention that I need the caption to move around with the image, so they can't be statically located one on top of the other.
I'm not "superwellversed" in CSS/HTML... but this page is doctype HTML 5.
Thank you!