I have this code
<div class="photo">
<img src="images.jpg">
<div class="text">Its transparent</div>
</div>
I have tried this css
.text{
opacity:0.8;
background-color:#ccc;
position:fixed;
width:100%;
height:100%;
top:0px;
left:0px;
z-index:1000;
}
also this
.text{
background: rgba(0, 0, 0, 0.28) none repeat scroll 0 0;
color: #fff;
position: relative;
top: -240px;
width:100%;
height:100%
}
I want to the text above in images(not a background) with transparent background. I does have a transparent but it doesnt cover the whole images. I have tried this but doesnt apply to me.
Allow a div to cover the whole page instead of the area within the container
Background images: how to fill whole div if image is small and vice versa