I have a problem with a caption.
How can I let the caption appear under each photo, when I hover over it.
The problem is that they all appear on one side at the bottom left corner.
Here is the HTML code:
<div id="content2">
<ul style="width: 5020px; height: 600px;">
<li class="image" style="width: 392px;"><img src="images/pr1x.jpg" ><p class="caption">1st caption</p></li>
<li class="image" style="width: 392px;"><img src="images/pr2x.jpg" ><p class="caption">2st caption</p></li>
</ul></div>
Here is the CSS code:
li.image p.caption {
position:absolute;
display: none;
font-size: 28px;
color: red;
}
li.image:hover p.caption {
display: list-item;
}
#content2{
width: 150%;
height: 600px;
float:left;
overflow:hidden;
}
#content2 p{
width: 150%;
}
.scrollbar-hor{
background-color: #e5e2de;
height: 24px;
width: 150%;
float:left;
}
.handle-hor{
height: 25px;
width: 400px;
background: url(http://brafitting.info/images/bar.jpg) no-repeat;
}
I’d try the new HTML5 elements
figureandfigcaptionhttp://html5doctor.com/the-figure-figcaption-elements/
HTML
CSS
http://jsfiddle.net/5Pcxv/10/