Is there a way to make text appear when hovering over an image, sliding in from the top and covering only 50% of the image height? Here's the code I have so far:
<img style="background-color:#3b283e; float:left;" src="images/f1.jpg" />
<div class="cags1">Traditional Pastry</div>
Here is the corresponding CSS:
.cags1{
background-color: #3b283e;
float:left;
}
.cags1:hover > img {
opacity:0.5;
padding: 10px;
font-family: Tahoma,Arial,Helvetica;
font-size: 14px;
line-height: 30px;
letter-spacing: 1px;
text-align: center;
color: #ffffff;
text-shadow: 0 1px 3px #000000;
}