As the title says I'm looking for an alternative method for opacity via CSS.
Here's what i mean by that.
The code provided, allows for transparency for DivA (which is what i want) HOWEVER! DivB is being placed inside of DivA. For some reason, it's obtaining the transparency, along with its text. That is what i do not want.
Further research indicates one method is to "trick" the site, with the code and placement. (ergo abso, position with exact cords) It works, but i don't want to constantly use abso position, especially with child elements. Is there any way i can float the DivB. while keeping it opaque, and keeping the DivA transparent?
Similar to how these forums are set. The white is transparent, yet the child elements ontop, are not, nor positioned absolute, AND remain opaque. I can't really find where it gives the needed code within the forum's view:source. (it's all cluttered and messy :I ) Any help?
Here's what i mean by that.
Code:
#DivA{
position:absolute;
top:250px;
right:10px;
width:25%;
height:100%;
background-color: black;
border-spacing: 2px;
border-style: solid;
border-color: red;
filter:alpha(opacity=40);
opacity:0.4;
}
#DivB{
float:right;
margin-top:5px;
margin-right:10px;
margin-bottom:5px;
font-size: 20px;
color: white;
}
<div id="DivA">
<div id="DivB"> Random Text </div>
</div>
Further research indicates one method is to "trick" the site, with the code and placement. (ergo abso, position with exact cords) It works, but i don't want to constantly use abso position, especially with child elements. Is there any way i can float the DivB. while keeping it opaque, and keeping the DivA transparent?
Similar to how these forums are set. The white is transparent, yet the child elements ontop, are not, nor positioned absolute, AND remain opaque. I can't really find where it gives the needed code within the forum's view:source. (it's all cluttered and messy :I ) Any help?