Children naturally inherit traits, including opacity. It would be quite unusual if they didn't. To create a transparent background, you can use an image with transparency or adjust the background-color
of BD
using RGBa
(where a stands for alpha).
For more information on using rgba()
, check out this helpful section on MDN.
Here's an example:
#BD {
background-color: rgba(0, 0, 0, 0.7);
}
It's worth noting that many questions have likely been asked and answered already. Before posting your question, it's a good idea to do a quick search to avoid duplication.
A search on this topic brings up resources such as this link, this one, this one, and this reference.