Pourquoi le DIV interne devient-il transparent lorsque j'utilise ce code?
Mon plan était d'avoir le texte visible et transparent.
Dois-je faire flotter le div interne sur le div transparent?Fond transparent sur DIV
Vous pouvez voir la démo en direct ici: http://jsfiddle.net/pBAf5/
HTML
<div class="openinghours floatRight">
<div class="content">My test goes here</div>
</div>
CSS
.openinghours {
height: 70px;
width: 300px;
padding: 10px;
font-size: 0.85em;
background-color: #f6f6f6;
border: solid 1px #c7c7c7;
margin-right: 20px;
margin-top: 5px;
opacity: .5;
filter: alpha(opacity=50);
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
RGBA: http://css-tricks.com/rgba-browser-support/ et pour le nœud frère, vous devrez utiliser le positionnement absolu –
http://akshar.co.in/?p=57 une solution basée sur RGBA –