1
I have two <div>
, One is superimposed on the other.
And I need the one on top to only show half the background. That is, the other half will be transparent so that the other half of <div>
low-visible.
Obs: the <div>
has to be on top of each other completely, I just need the background stay halfway.
<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)
}
post your code and where you’re having trouble, so we can help you
– Luciano Azevedo
That question is a duplicate of: http://answall.com/questions/71208/como-display-somente-metade-do-background-color-da-div
– MarceloBoni
Do not duplicate the questions, please try my answer: http://answall.com/a/71389/3635 I have already voted to reopen the other question
– Guilherme Nascimento