I am trying to add a div with transparent property .
.products
{
width:280px;
height:320px;
float:left;
background:#fff;
margin:5px;
}
.products:hover
{
-moz-box-shadow: 0 0 5px 5px #ccc;
-webkit-box-shadow: 0 0 5px 5px#ccc;
box-shadow: 0 0 5px 5px #ccc;
}
.p_desc
{
height:120px;
background:#666;
opacity:0.6;
filter:alpha(opacity=60);
}
The HTML :
<div class="products">
<img src="css/images/products/3m_1440.jpg" />
<div class="p_desc">This is a good product</div>
</div>
Image size is 280x320px . I am expecting the class p_desc to transparent within div products .But result is its transparent but not withing the products,its overflowing !

Give
position:absoluteto your.p_desc.write this: