I need to make some adjustments to a WordPress template. One of the changes is to set the background color of an element to transparent. The wrapper div, which has the background color applied to it, contains many nested child divs that all inherit that color.
<div class="A">
<div class="B">
<div class="C">
<div class="D">
....
.A {
background-color: #fff;
}
I thought that changing the color of the parent would automatically change it for the children as well. However, even though I successfully overwrite the parent's color, the children still inherit the original color. Since the nesting is very deep, I'd prefer not to have to manually change each child element.
Is there a more efficient solution to this issue?
Just to clarify: this is the parent element with the background color I changed:
https://i.sstatic.net/RiyeB.png
And this is a child element that still inherits the original color even after being overwritten:
https://i.sstatic.net/91Mbn.png
Thank you in advance