I have two divs, one of which is .father and the other is.child as follows:
<div class="father">
<p></p>
</div>
<div class="child">
<p></p>
</div>
As you can see, the child is not inside the father (sorry if this seems like a dog, the only example blinked to me). What I'm trying to do; when I give .father the background color, let's say "background-color: # 000". I want the child to inherit the color black, but make it brighter / darker ...
I tried to do the following:
.child {
background-color: -20%;
}
I don’t know if this is true, I think it’s stupid, but I need to share what I did. I also tried to do this using CSS transparency, but this will apply to the whole div ... what if the div has text inside it?
, , div.child div div , div.child, !
, div ? .