Why does setting opacity make the text inside the box transparent too?
Opacity affects the entire element and all its children, so both background and text become see-through. To make only the background transparent, use rgba() for background-color instead.
💡 Use rgba() for background transparency; use opacity only when you want everything faded.
Why can't I see the white background through the box when I only set background-color with rgba?
If the background-color uses rgba with alpha less than 1, the background is semi-transparent, so the white page behind shows faintly through the box.
💡 Lower alpha in rgba means more see-through background.
What happens if I set opacity on a parent container with many children?
All children inherit the parent's opacity visually, making the entire group semi-transparent, which might not be desired if you want only backgrounds transparent.
💡 Apply opacity carefully; consider rgba backgrounds for selective transparency.