Background inheritance

A short note about the (non-) inheritance of background values.

At first glance, it appears as if my background-colour ...
... is inherited by my children.
But this obviously isn't the case ...
... when the child element overlaps; the background is actually transparent, by default.
A value of inherit for my child's background-color ...
... explicitly shows the difference. The background colour now applies to both outer and inner div.

Comments

Leave a comment