I have two <div>
, one is superimposed on another.
And I need the one on top, just show half of the background . That is, the other half will be transparent so that the other half of the <div>
underneath is visible.
Note: <div>
has to be on top of the other in full, I only need background in half.
<div id="coberturas">
<h2> Coberturas </h2>
<div class="sp"></div>
<ul>
<a href="fotos.php?id=<?php echo $row_RS_coberturas['id']; ?>"> <li><img src="imagens/01.jpg" width="320" height="320" /> <br/>
<legend> <span>29/05/2015 - TUPACIGUARA MG</span> <br /> <h1>EXPO CAPITU</h1></legend></li></a>
</ul>
</div>
CSS:
#coberturas legend{
font:Lucida Sans;
padding:10px 20px;
display:block;
position:absolute;
bottom:0;
box-sizing: border-box;
background-color:#FF9911;
width:320px;
}
#coberturas legend a{
text-decoration:none;
font-family: 'Lato', Calibri, Arial, sans-serif;
background-color:rgba(0,210,210,0);
color:rgba(0,210,210,1);
color:#FFFFFF;
}
#coberturas legend h1{
position:relative;
font:Trebuchet;
margin-top:3px;
font-size:22px;
color:#FFFFFF;
}
#coberturas legend:hover{opacity: 1;
background-color:#FF6600;
}
#coberturas ul{
margin-left:-30px;
margin-top:20px;
}
#coberturas img{
border: 0;
display:block;
transition:all 0.3s;
-webkit-transition:all 0.3s;
}
#coberturas img:hover{
opacity:0.8;
-ms-transform: scale(0.98); /* IE 9 */
-webkit-transform: scale(0.98); /* Chrome, Safari, Opera */
transform: scale(0.98);
}
#coberturas a:hover{
background-color:#FF6600;
opacity:0.8;
-ms-transform: scale(1.03); /* IE 9 */
-webkit-transform: scale(1.03); /* Chrome, Safari, Opera */
transform: scale(1.03)
}