I do not want to inherit the child opacity from the parent in CSS.
I have one div which is the parent, and I have another div inside the first div which is the child
A little trick if your parent is transparent and you would like your child to be the same, but defined exclusively (e.g. to overwrite the user agent styles of a select dropdown):
.parent { background-color: rgba(0,0,0,0.5); } .child { background-color: rgba(128,128,128,0); }