I'm trying to reset the opacity to 1.0 for 'Demo text 4' where its container has opacity set to 0.3. I read that I could set the text directly using: color: rgba(255, 255, 0, 1); but this will not work for me. Is there a way to achieve my goal?
<!DOCTYPE html>
<html lang="en">
<head>
<style>
#text_holder {
background: blue;
width: 500px;
height: 200px;
}
#text_holder2 {
background: blue;
width: 500px;
height: 200px;
color: rgba(255, 255, 0, 1);
}
#alpha_30 {
opacity: 0.3;
color: #ff0000;
}
#alpha_100 {
color: #ff0000;
}
</style>
</head>
<body>
<div id="alpha_100">
<div id="text_holder">
<p>Demo text 1</p>
</div>
</div>
<div id="alpha_30">
<div id="text_holder">
<p>Demo text 2</p>
</div>
</div>
<div id="alpha_30">
<div id="text_holder">
<p>Demo text 3</p>
</div>
<div id="text_holder2">
<p>Demo text 4</p>
</div>
</div>
</body>
</html>